cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Autocomplete Activity AND show in Process table

vmcdaniel
2-Guest

Autocomplete Activity AND show in Process table

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

5 REPLIES 5
KD
4-Participant
4-Participant
(To:vmcdaniel)

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

vmcdaniel
2-Guest
(To:KD)

WC 10.1 M030 CPS09

BenPerry
13-Aquamarine
(To:vmcdaniel)

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

}

vcarmona
4-Participant
(To:BenPerry)

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.

automatic approve1.png

hs-2
5-Regular Member
(To:BenPerry)

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

Top Tags