Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I need to get the Assigned Date from My Task once the activity is started. Using the self variable, I can retrieve the WFAssignment object that contains all task details. From this, I want to take the Assigned Date, add 5 days to it, and then set that new date to a date attribute using IBA.
Can anyone help me with example code that should be written in the Transition tab of the workflow for this?
Very doable.
I’ve done similar for a company that wanted to reset due dates on tasks.
And for companies that wanted to send an alert 5 days before something was due.
Custom code for sure but it is doable.
Can you please share the example code it will be helpful to implement it in the workflow
Here is something I did that validated need by date on change request in workflow:
java.util.Calendar c=java.util.Calendar.getInstance();
c.add(java.util.Calendar.DATE,21);
java.util.Date n=((wt.change2.WTChangeRequest2)primaryBusinessObject).getNeedDate();
if(n == null)
{
result="null";
}
else if (c.getTimeInMillis() < (n.getTime()))
{
result="ok";
}
else
{
result="notOK";
}
Can we get the date attribute from a part and set the IBA value from the workflow transition tab without writing any logic in Java files? I need to write everything inside the transition tab of the Start activity.