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.

Submit form to a specific person by entering a specific name

Avatar

Former Community Member

Hello,

I would like to ask if I can create a process that the user can submit their completed form to a specific name (or whoever they need to) with a flexibility to enter that name rather than hard-coded it in the workbench which go that person only. e.g. User complete the form and submit it with an option to enter the name of whom they want to submit to so that the form will go to that person's name only since the form may goes to a different person each time. Please share your advise if it is possible or not in LiveCycle Workbench ES (8.2.1.3).

Thanks in advance,

Han Dao

17 Replies

Avatar

Level 10

In Workbench, you have the option to use xPath when specifying a user. In 8.2, the xPath needs to use a variable that contains the guid for the person you want to send the form to.

Here's what I would do:

1- Have a field on the form with the name of the next user.

2- In Workbench, extract the name from the data.

3a (8.2) Make a DB call to get the GUID for that person.

3b (ES) Use the Find User operation to get a User object that corresponds to that user.

4. Pass the variable to the User step.

Jasmin

Avatar

Former Community Member

Hi Jasmin,

I am confusing at the step 3a & 3b, can explain a litle bit more. Or if you have a sample can you please share.

Thanks,

Han Dao

Avatar

Level 10

It's one thing to have the person's name in a field (or in the data), but you need to relate it to a valid LiveCycle user.

In 8.2 there's no easy way to make that correlation. You would have to make a db call to the LiveCycle table to get the unique identifier (guid) that corresponds to that user. This guid uniquely identify the user in LiveCycle and that's what you need to pass in a variable to the user step.

In ES, we have a Find User operation that can search for a user in LiveCycle based on some criterias (name, email, login id) and return a user object. You can then pass that user object to the user step.

Jasmin

Avatar

Level 4

Something like this is what your DB call would be:

Select id from EDCPRINCIPALENTITYUSER where COMMONNAME like '%{$ /process_data/@userName $}%'

Avatar

Former Community Member

Hi,

I am not sure what I miss in the process that is not working right, it stalled when tested it. I am attached the archive file here, can you please check it for me. Well, for some reasons, I can't see the option to attach the file, is there an issue with the attachment function?

Thanks,

Han Dao

Avatar

Former Community Member

Hi Jasmin,

For some reasons, I still could not see that attachment option that I can attach my process for your review. Can you please provide your email that I can sent it directly to you for your review.

Thanks,

Han Dao

Avatar

Former Community Member

Hi Jasmin,

I was out for many days so I just start to re-do the steps that you suggested and was able to get it thru step 4 but at step I got the variable return as a number '1' or '0' instead of the name so the process fails right there. Can you please advise how to fix it.

Thanks,

Han Dao

Avatar

Level 10

But the variable you get from 3 should be of type User???

Use the green + sign from the output of the Find User step to create the variable with the right type. The pass it to the user step.

Jasmin

Avatar

Former Community Member

Hi Jasmin,

I am still missing something that I could not make it work right. The attachment is temp disabled so I can not attach the file here. Can you please provide the email so I can send my process to you for your review.

Thanks a lot in advance,

Han Dao

Avatar

Level 10

Send it to livecycle8@gmail.com

Jasmin

Avatar

Level 10

Han,

First, you don't need the database "Look Up" step since you're using the Find User service. As a side note, the Number of Rows Retrieved of Output section of the Look Up step return the number of rows (int) and NOT a user object.

Just put the name you want to find in the Name sectin of the Find User.

The Result section of Find User service contains two possible return values:

Results, which gives you the number of users found

User, which put the first found user in a user object.

You need to pass the user object to the User step and not the results one.

Jasmin

Avatar

Former Community Member

Hello Jasmin,

I have updated the process as you suggested by removing the db lookup and changing it to use the user object but now I got the below error:

[7/26/10 13:25:36:647 CDT] 00000055 ExceptionUtil E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "doRequiresNew" on bean "BeanId(LiveCycle8#adobe-dscf.jar#EjbTransactionCMTAdapter, null)". Exception data: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: Han Dao of type: java.lang.String to type: class com.adobe.idp.dsc.um.lookup.datamodel.User

Can you help on this?

Thanks,

Han Dao

Avatar

Level 10

It looks like your trying to specify a "string" in a "user" object.

Is that possible? Make sure to use the right data types.

Can you take a screen shot of the Find User properties?

Jasmin

Avatar

Former Community Member

Jasmin,

Here is the print shot.

Thanks,FindUser_Properties.png

Han Dao

Avatar

Level 10

The Find User service searches for a user in LiveCycle user manager that matches some search criteria.

For example you put "Jasmin" for the name in the filter area , and if it find a user that has the name "Jasmin" in LiveCycle, it will put the found user in a object of type User called SpecUser.

There are two issues with your settings:

1- You using multiple filters. This is not an issue per say, but most of the time one filter is more than enough. I doubt you know the user id.

2- You can't use the information from the SpecUser in the search filter, since the SpecUser will be populated with user information ONLY if it finds a user that matches your search criteria.

Jasmin