Skip to main content
1-Visitor
September 20, 2021
Solved

Can you use a checklist in a Windchill Workflow task

  • September 20, 2021
  • 4 replies
  • 4779 views

Hello, 

 

Has anyone used checklists as part of a Windchill Workflow task?  We want to use a checklist in the assigned activity to verify that the assignee has done everything they need to before the task moves on.  This seems like something that would be useful to many organizations, but I can't find anything for it.  I'm hoping someone out there has done this and can tell me where to start. 

 

Thank you

 

-ddmartin3-

Best answer by imendiola

Hi ddmartin3,

 

Have you tried to add boolean variables to the workflows task? If you mark them as visible, the workflow task should show them in the UI.

You can initialize them to false, and add a Java code in the complete transition of the task to check if all of them have been changed to true to throw an WTException with a custom message for the user if not.

 

Regards

4 replies

17-Peridot
September 21, 2021

That would be indeed very interesting! Unfortunately I think the workflow UI is very stiff and not customizable.

imendiola13-AquamarineAnswer
13-Aquamarine
September 21, 2021

Hi ddmartin3,

 

Have you tried to add boolean variables to the workflows task? If you mark them as visible, the workflow task should show them in the UI.

You can initialize them to false, and add a Java code in the complete transition of the task to check if all of them have been changed to true to throw an WTException with a custom message for the user if not.

 

Regards

ddmartin31-VisitorAuthor
1-Visitor
September 21, 2021

Thank you!  This sounds like exactly what I need.  I'll try it and report back with my findings. 

 

-Dee- 

18-Opal
September 21, 2021

Are you talking about an honor system check meaning just check a box with no verification that the user actually did what they're suppose to do? Kind of like the "By Checking this box you agree that you have read and understand this agreement".

Or something that actually means something like running code that checks/verifies the user did what is required before proceeding.

 

Both are can be included.  My rule of thumb is if it is possible you write code and verify.  If it is not possible to write code to verify but you want to add a checkbox as nothing more than a reminder to the user then you do that.

 

I don't even ask if the customer wants verification anymore (they ALL do).  I just get their specs and set it up. SOP.

 

David

ddmartin31-VisitorAuthor
1-Visitor
September 21, 2021

Basically just the "By Checking this box you agree that you have read and understand this agreement" kind of check box.  There is too much variability in the number of uploaded documents per job to say verify they were all uploaded programmatically.  But we would prefer if we didn't have rework because someone forgot to sign or check the date on the form they're reusing.  We end up losing a lot of back and forth time for silly reasons, and maybe if a little more time was taken upfront we could save a lot of time overall and trust the system.

 

-Dee-

avillanueva
23-Emerald I
23-Emerald I
September 21, 2021

I added this acknowledge check box and a bit of javascript. Does not let complete task button to be checked unless they check the box. 

avillanueva_0-1632247462798.png

 

ddmartin31-VisitorAuthor
1-Visitor
October 12, 2021

Oh?  Using Javascript is an interesting decision.  Also, how did you do that?  There are places in tasks that accept Java. Where does one add Javascript?

avillanueva
23-Emerald I
23-Emerald I
October 18, 2021

It required using a custom JSP task template. That is where you can put the JavaScript. The next piece was to override the complete button jsp since that is what generates the complete button. Below is from my initial task template:

<tr>
<td></td><td></td><td valign="middle" align="left">
<FONT class=wizardbuttonfont><jsp:include page="/netmarkets/jsp/customtemplates/ccbReviewCompleteButton.jsp"/>
</FONT>
</td>
</tr>

There is a bit of JSP in the JSP called out above to refer to the javascript function:

if(isShow.equals(Boolean.TRUE))

{

am = NmActionServiceHelper.service.getActionModel("complete Custom workitem",myNmWorkItem);

NmAction completeTask = (NmAction)am.getActions().get(0);

completeTask.setButton(true);

completeTask.setTitle("Complete");

completeTask.setDesc("Complete");

//completeTask.setEnabled(true);

completeTask.setEnabled((!myNmWorkItem.isCompleted() && !myNmWorkItem.isSuspended() && myNmWorkItem.isMine()));

//addition - Parent JSP page must contain this validtion script

completeTask.setOnClick("validate_Complete()");

actionBean.setAction(completeTask);

NmContext context = nmcontext.getContext();

context.pushElement(myNmWorkItem);

NmAction.actionjsp( actionBean, linkBean, objectBean, localeBean, urlFactoryBean,nmcontext, sessionBean, out, request, response);

context.popElement(); actionBean.setAction(null);

}

 

I also had a custom action command inserted for other things.