-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added workflows_list() and workflows_list_pd().
- Loading branch information
1 parent
3c55c5b
commit e5f0e05
Showing
6 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
class WorkflowApiError(Exception): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import os | ||
import sys | ||
from datetime import datetime, timedelta | ||
from pprint import pprint | ||
from pydantic import BaseModel | ||
|
||
sys.path.insert(0, "") | ||
from nacwrap import * | ||
|
||
|
||
class PurchDocStartData(InstanceStartData): | ||
requestor: str = Field(alias="se_txtrequestor") | ||
requestor_email: str = Field(alias="se_txtrequestoremail") | ||
purchaser_code: str = Field(alias="se_txtpurchasercode") | ||
|
||
|
||
def test_list_instances(): | ||
instances = nacwrap.instances_list( | ||
workflow_name="Purchase Approval", status=WorkflowStatus.RUNNING | ||
) | ||
# pprint(instances) | ||
|
||
instances = nacwrap.instances_list_pd( | ||
workflow_name="Purchase Approval", status=WorkflowStatus.RUNNING | ||
) | ||
|
||
for i in instances: | ||
print(f"Name: {i.instanceName}") | ||
|
||
|
||
def test_list_workflows(): | ||
# workflows = nacwrap.workflows_list() | ||
|
||
# print(workflows) | ||
|
||
workflows = workflows_list_pd() | ||
|
||
print(workflows) | ||
|
||
|
||
test_list_workflows() |