Skip to main content
1-Visitor
July 3, 2013
Question

WorkFlow Suggestion for WindChill 10.1

  • July 3, 2013
  • 4 replies
  • 1775 views

Hi All,

I am trying to create a doc which needs to be approved by at least 4 department. WorkFlow stuff is easy but my issue comes with two things.

1st issue: Creator needs to pick (Drop down or radio button) a route for this doc. Not sure how i can implement a condition routing during a work flow.

2nd issue: one of the approving role (department) need to attached (Required) doc. so how can i make this mandatory for that Role?

4 replies

12-Amethyst
July 9, 2013

Hi Imtiyaz,

For your 1st issue,

You can use an activity's Routing tab with Routing type Manual or Manual Exclusive.

For your 2nd issue,

In Activity's Transition tab for complete event you can write a code to check whether there is any doc attached (primary or secondary) with the PBO.

If not throw an Exception with a message.

When the user will Complete the task then the code will execute.

Thanks & Regards,

Kaushik

IMomin1-VisitorAuthor
1-Visitor
July 9, 2013

Kaushik,

would you be able to write that code for 2nd issue?

12-Amethyst
July 9, 2013

Hi Imtiyaz,

  • To get the secondary attachment of any persistable object programmatically :-

QueryResult qr2 = AttachmentsHelper.service.getAttachments(persistable, ContentRoleType.SECONDARY);

//If size of qr2 is zero that mean it has no secondary attachment

  • For primary data it will be :-

ContentHelper.service.getPrimaryContent(ObjectReference.newObjectReference(persistable));

//Returns null means no primary object

In your case the persistable object is nothing but your PBO which is a WTDocument I guess.

In workflow you have to write fully qualified class name.

Thanks & Rehards,

Kaushik