Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I get the target Status of a com.opensymphony.workflow.loader.ActionDescriptor

Normann P_ Nielsen _Netic_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2020

I have a hold of a  com.opensymphony.workflow.loader.ActionDescriptor

 

I can getName() = "Reopen"

I can getId() =51

 

But How do I the the status after the transition?

 

It seems that getMetaAttributes()  just give names back

 

I want to travel all actions and select the one with a specific end status. Doing a fake thing, I get:

 

No signature of method: com.opensymphony.workflow.loader.ActionDescriptor.getStep() is applicable for argument types: () values: []
Possible solutions: getView(), getAt(java.lang.String), getId(), getName(), grep(), setView(java.lang.String)

 

I know the solution is close in here:

 

https://www.codota.com/code/java/classes/com.opensymphony.workflow.loader.ActionDescriptor

 

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
2 votes
Answer accepted
Normann P_ Nielsen _Netic_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2020

targetStepId = actionDescriptor.getUnconditionalResult().getStep()

StepDescriptor targetStepDescriptor = workflow.getDescriptor().getStep(targetStepId)

targetStepName = workflow.getLinkedStatus(targetStepDescriptor).getName() 

log.info "Script=" + scriptName + " ScriptRunIdent=" + scriptRunIdent + " Message='Target Step Status: " + targetStepName + "'"

Александр Поляков October 18, 2022

Thanks!

TAGS
AUG Leaders

Atlassian Community Events