Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hello,
I would like to show an Activity, which Auto Completes, in the Process table. Is it possible?
When the Activity is set to 'AutoComplete after deadline', it does not show in the table.
Is there a setting which can enable this?
Thanks!
V
Can you please give more details like which windchill version you are along with Date Code ?
WC 10.1 M030 CPS09
I have code in an Execute Expression robot that auto-completes the workflow task based on some certain conditions. I am not using that deadline functionality as the condition to trigger the auto-complete. What do you think?
(Note that I have some code offloaded into ext.WorkflowUtilities package. This code was generated with the help of tech support.)
// Check to see if the task should be auto-completed
autoCompleteTaskResults = "";
if (true)) { // your condition would go here.
System.out.println("Yes, autocomplete");
// Get the process so that the workflow task can be automatically completed
wt.fc.ObjectReference procRef=self;
wt.workflow.engine.WfProcess process = null;
if(procRef.getObject().getClass().isAssignableFrom(wt.workflow.engine.WfProcess.class)){
process = (wt.workflow.engine.WfProcess)procRef.getObject();
}
// Complete the workflow task via API
autoCompleteTaskResults = ext.WorkflowUtilities.closeActivity(process, "WF TASK NAME GOES HERE", "OPTIONAL: TASK COMMENTS HERE.", "VOTE (IF THERE IS ROUTING OPTIONS FOR THIS TASK");
System.out.println("The result of auto-completing the task is: " + autoCompleteTaskResults);
} else {
System.out.println("Bummer - need to complete the task.");
}
Within the workflow, the robot expresses how you are placing it? since I have the same detail that does not show me the process since I am putting the deadline.
autoCompleteTaskResults = ext.WorkflowUtilities.closeActivity(process, "WF TASK NAME GOES HERE", "OPTIONAL: TASK COMMENTS HERE.", "VOTE (IF THERE IS ROUTING OPTIONS FOR THIS TASK");
Submit change notice task not have any voting option then how can use the closeActivity method? does this works without pass voting