cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Robot Step in a Workflow

Robot Step in a Workflow

hello,

 

as sometimes we have to have the Workflow Transition to be finished before being able to "play" with item created within Action Script (Add item to BOM etc...), could it be possible to have some step that are acting as robot... it means that it should launch a scipt when this "robot" script is reached...

 

in case of failure, we can either cancel previous Transition or if successfull, force next Transition to go to the next "manual" Step...

 

Best regards

5 Comments
gasevsm
Alumni
Greetings, WF Action scripts run on-Transition effectively rendering them valuable in cases they fail 'due to scripting errors' because they will stop the transition from occurring. If you are after capturing logical business errors, recommend handling those in the validation script as it runs pre-transition. For the other use case, automating a workflow transition is possible. Incorporate one of these lines specifying next WF transition's transID or its customID as defined in WF editor’s Transition Properties. The 'COMMENTS' parameter is optional. item.performWorkflowTransition(transID, 'COMMENTS'); or item.performWorkflowTransitionByCustomID('CUSTOM_ID', 'COMMENTS'); Hope this helps,
spiazza78
Enthusiast

hello,

 

before posting this request, I had tried several options included the one you are proposing but that doesn't seem to work ... I also tried the first transition step etc... etc...

 

now it is up to us to define how we can manage failure in an automated transition, and I would suggest that we can potentially rollback the last successfull transition.

 

it could be very helpfull because sometimes we need to have persistent objects and also to split to "long" action script....

 

best regards

gasevsm
Alumni

Did you try handling failure conditions via a WF validation script?  Its purpose is to validates certain requirements before allowing the WF to transition to the next state, thus avoiding the need for a rollback alltogether.  If validation suceeds, the transition proceeds forward together with its associated action script, if set.  If validation fails, the user is provided feedback via array of messages explaining why the WF transition was interrupted.  See script examples here.  Double-click a workflow transition to see the Transition Properties dialog and set a validation script.

 

Hope this helps,

 

nguyentru
Alumni
Status changed to: Future Consideration
 
aaron.tw
Alumni
Status changed to: Archived
 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report