How to pass performer dynamically while initiating workflow / completing manual activity using DFC?

Options
vinojash
edited November 17, 2023 in Documentum #1

I've developed a process (workflow template) within Documentum Workflow Designer. This process includes three manual activities, and for each activity, the performers are configured with the "Previous Activity Performer to Choose at Runtime" option. I'm utilizing the following code to initiate the workflow and successfully complete a task.

//Initiate workflow
IDfWorkflowBuilder bldr = this.session.newWorkflowBuilder("process id");
IDfWorkflow workflow = bldr.getWorkflow();
bldr.initWorkflow();

//To complete workitem
IDfWorkitem wi = (IDfWorkitem) this.session.getObject(new DfId(workItemId));
if (wi.getRuntimeState() == 0) {
wi.acquire();
}
wi.complete();

How to pass the performer dynamically during the initiate a workflow and completing a task?

Tagged:

Best Answer

Answers