Forum Discussion
David_Sierra_Fernández
2 months agoIdeator I
Resolved:
Following up on my own question with what worked for me (Aras Innovator 35):
-
Goal: start a Workflow Map from a custom Action on Document, letting the user pick the map.
-
Approach:
- Created an Action on ItemType “Document” that runs a client method which opens a modal Form.
- Form “Select Workflow”:
- Added to Document → Views with Type left empty (important for data binding).
- OnFormPopulated method populates a dropdown with:
- Allowed Workflows for Document (if the user can Get them), otherwise
- all “current” Workflow Maps as a fallback.
- Submit button OnClick calls instantiateWorkflow(mapId) and then apply("startWorkflow").
- To avoid duplicate dropdowns:
- Ensure the Form contains a single select with a known id, and the methods target that same id (otherwise the method will create one dynamically).
- Permissions (for the user who starts the WF):
- Workflow Map: Get
- Workflow Process, Activity, Activity Assignment: Get, Create, Update
- Document: Get (and typically Update); Can Discover as needed
- If you want to list only Allowed Workflows (no fallback), make sure the user can Get “Allowed Workflow”.
-
Result: The Action opens the modal, user selects a map, and the workflow starts. You can verify it under Workflow Processes.
-
Extra: We cloned the base map (“Save As”) to create the different variants needed, set “is_current”, assignments, and permissions within each map, and (optionally) related them as Allowed Workflows on Document, marking a default.
If someone knows another method to resolve this issue, please inform me.
Thanks!
David