Skip to content

Commit

Permalink
Merge pull request #12 from pepsimidamerica/dev
Browse files Browse the repository at this point in the history
Fixed NintexInstance to use correct status enum.
  • Loading branch information
lambertjonchris authored Nov 20, 2024
2 parents 2585e72 + b692266 commit c63e701
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nacwrap/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Workflow(BaseModel):
instanceName: Optional[str] = Field(default=None)
workflow: Workflow
startDateTime: datetime
status: TaskStatus
status: WorkflowStatus
startEvent: dict


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="nacwrap",
version="0.1.7",
version="0.1.8",
description="Python package that acts as a wrapper for the Nintex Automation Cloud system.",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
21 changes: 15 additions & 6 deletions tests/instance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,30 @@


def test_list_instances():
instances = nacwrap.instances_list(status=TaskStatus.PAUSED)
pprint(instances)
instances = nacwrap.instances_list(
workflow_name="Purchase Approval", status=WorkflowStatus.RUNNING
)
# pprint(instances)

instances = nacwrap.instances_list_pd(status=TaskStatus.PAUSED)
instances = nacwrap.instances_list_pd(
workflow_name="Purchase Approval", status=WorkflowStatus.RUNNING
)

for i in instances:
print(f'Name: {i.instanceName}')
print(f"Name: {i.instanceName}")


def test_get_instance():
instance_dict = nacwrap.instance_get(instanceId='d39c4615-863d-47ff-a800-c4b82cdc1e1f_0_4')
instance_dict = nacwrap.instance_get(
instanceId="d39c4615-863d-47ff-a800-c4b82cdc1e1f_0_4"
)
pprint(instance_dict)

instance = nacwrap.instance_get_pd(instanceId='d39c4615-863d-47ff-a800-c4b82cdc1e1f_0_4')
instance = nacwrap.instance_get_pd(
instanceId="d39c4615-863d-47ff-a800-c4b82cdc1e1f_0_4"
)
print(instance)


# test_get_instance()
test_list_instances()

0 comments on commit c63e701

Please sign in to comment.