I have a form where at the end there are 2 possible paths a form can take. If a user selects 'pay now' then the user is taken to payment and form is finished, bypassing collaboration.

But if a user selects the 'pay later' option then the form is run through the collaboration service and a task is created that gets picked up by a user of the defined group.

I cant seem to work out how to use the conditional route name based off a selection in the form. It looks like that if i choose the 'pay now' option then payment is initiated and the collaboration service doesn't even come into play, but if i choose pay later i get an error:

Here is the code I am JSON for the job controller i am trying to work with:

So basically i am hoping to have one option where it doesn't necessarily need to run through the collaboration (Pay now) and the other it runs through the Collaboration steps.


Any ideas????

    CommentAdd your comment...

    1 answer


      Hi Don,

      There are a couple of ways to add the functionality you described. The first would be in form, the other is how you have done it.

      Using your collaboration job as an example,

      From application start there is two routes, Shopfront and Deliver.

      Using the inform method, you can set the job route using a business rule or other field script. Simply set the route field, located Nuts & Bolts>Transaction Manager Support>CollaborationSupport>RouteName, using the code sfc.setRawValue({RouteName}, "ROUTE_NAME"). Here you can add the conditional logic to define different routes based inform values.

      The other method is using the conditional JSON as in the above question. From what i can see in your provided code it should work. However there was a bug in some older TM versions around Collaboration jobs, the work around for this was to remove the spaces in the conditional. Like this:


      I also added an else clause, to replicate the desired functionality. Double check that any servies that the controller is calling are correctly named, and that the job controller services is selected in the form services tab in the form version within TM.

      If you continue to get an error you may need to raise a support ticket with some additional information about the collaboration Job.


      1. Don Sibley

        Thanks Josh, I was able to get this working by adding some logic in the form as you pointed out. Based off selections in the form the job will go to delivery or go and and get task created. Thank you for your help!

      2. Joshua Miller

        You can find some more information in the following knowledge base article, https://support.avoka.com/kb/display/AT43/Composer. Including setting the route value.

      CommentAdd your comment...