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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

Edited
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.
Mar 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.
Mar 29, 2020 • edited

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 + "'"

TAGS
AUG Leaders

Atlassian Community Events