Custom Transport - Echo Value to Assign Field Value to Role

This transport was created because of the Assign Users (By Service Call) submit activity.  If you have ever used this you will know that you must call a service to assign a user to an "open" role.  In some cases, I want the initiator of the form to be able to specify who the form should pass to next and that is done in a field on the form.  What I really want is the ability to map the value of a field on my form to an "open" role, since this doesn't exist (as of 8.6.4) I chose to create a service that made this possible.

The transport is very simple, it takes one input (the field value that contains the id of the next user) and it has one output (the exact value that was passed as an input).  By using this transport I can now assign a user to an "open" role from a field on the form.

This sample was built using 8.6.3.  Included is the transport jar file that can be placed in your extensions directory, the xml file to go in your serviceCatalog/1 directory and a sample FEB app that uses the service with the Assign User submit activity.

EchoValueTransport.zip

The service that gets called to assign a user to a role is intended to be a retrieve, in that the input provided should always return a single value.  If your service was setup such that it returned more than one entry than you could end up with a record where the person that should have access doesn't and someone else who does but shouldn't.  Therefore even with this echo transport you should still insure that the value was validated before the form gets submitted.  If the user is entering a name, email, or uid then you may want to validate it by using an LDAP service, that way if the value was entered incorrectly it can be corrected before the form is submitted.