Skip to main content
1-Visitor
June 16, 2016
Question

Autocomplete Activity AND show in Process table

  • June 16, 2016
  • 2 replies
  • 3727 views

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

2 replies

12-Amethyst
June 17, 2016

Can you please give more details like which windchill version you are along with Date Code ?

vmcdaniel1-VisitorAuthor
1-Visitor
June 17, 2016

WC 10.1 M030 CPS09

15-Moonstone
September 19, 2016

Vaughn McDaniel‌,

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.)

2016-09-19_16-06-04.png

// 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.");

}

6-Contributor
February 20, 2019

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