Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Flex + Multiple Routes, which button clicked?


Former Community Member
I have a User Task (which uses a Flex form) in workbench which has 2 defined routes leading out of it, Approve and Reject. If Accept, a bunch of validation should occur. If Reject, no validation is needed.

When the user clicks on either of these buttons in the bottom of Workspace, I receive an event within Flex, which typically kicks of my validations. But, both buttons fire off this event and I don't see any way of telling which of the 2 buttons was clicked.

Anyone have an idea
2 Replies


Former Community Member

At your PDDF form you have controls loke this : AWS_SUBMIT, AWS_ACTION, AWS_PROCESSTYPE etc.

AWS_SUBMIT it is button, you can put some javascript code on it's onClick event , which will make youre validation.


prodata.AWS_SUBMIT::click - (JavaScript, client)

// This is the AWS_SUBMIT click script

if (xfa.host.name == "Acrobat")



if (prodata.AWS_ACTION.rawValue == "Cancel"){

data.main.field.validate.nullTest = "";


if (prodata.AWS_ACTION.rawValue == "Approve"){

data.main.field.validate.nullTest = "Error";



Former Community Member

Not using PDFs, using Flex.

I think the answer is you have to do it yourself.

  1. Only 1 route out of the Assign Task.  This is Complete Task
  2. Create a Decision Point which routes based upon data provided in the XML provided by the form.