Skip to content

Use workflow api to delete a workflow when deleting a solution #1450

@chris-fox

Description

@chris-fox

When we deploy a workflow it also creates a feature service and related views. It is not enough to just delete the workflow item when we delete a solution we need to clean-up the other services as well. Workflow Manager provides an api to do this for us and handles deleting these related services automatically. We should use this api for the workflow item when deleting a solution:

https://developers.arcgis.com/workflow-manager/api-reference/rest/delete-workflow-item/

This api does not take care of deleting the group that is created with the workflow. We should also delete this group when deleting the solution. We can get the group id from the Workflow item data via the groupId property:

{
    "groupId": "64006d05741746caa8ff166063d0ec48",
    "workflowSchema": {
        "itemId": "583d4236bdd44b3bbeb6d44e1654c308"
    },
    "workflowLocations": {
        "itemId": "86d42e5719db4d72913adaad91668a84"
    },
    "viewSchema": {
        "itemId": "79ba9555586b4a55bc694974b7a863be"
    },
    "cleanupTask": {
        "itemId": "f35ac84bf88a42a091551f2e10894f4a"
    }
}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions