Highlighted

Flex + Multiple Routes, which button clicked?

The_Flex_Viking

05-03-2009

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

Replies

Highlighted

Avatar

Guest

20-03-2009

Hello,



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.

Example:

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



// This is the AWS_SUBMIT click script

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

{

//validation

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

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



}

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

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



}
Highlighted

The_Flex_Viking

13-04-2009

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.