XCP Form Result list mapping with input process variable
Hi Experts,
I have created a Form which is having search inputs and Result list widget.
My requirement is to generate pdf which is having content of selected record from result list in above form.
For generating PDF i have created a stateless process and used java service activity (which hold pdf generation class file), and passing input process variables to my java class as arguments.
At run time when i select single record in result list, form arguments are passing to my java class as args[], if i select multi records in result list args[] passing to java class as last selected index values, and ignoring the fist selected row values.
For your information i am using process variables as multi value attributes.
When i click generate challan my pdf will generate process data mapping is as like below:
output in PDF for multi record selection is as below(only last selected row in result list is coming to args[])
Best Answer
-
Hi Vasu,
Could you please confirm purpose of the below screen shot:
The reason I'm asking is that the way I read this screen shot is that you trying to get a multi-value variable into a single value argument. More specifically, you are copying bank_name[ALL] (multivalued) into arg0[0] (single value) and the same applies to amount[ALL] to arg0[1].
If you want to copy the multiple values from the process variables as arguments for your java service, I suggest using two arguments for your java service method. More specifically, don't use the main(String[] args) method as entry point, but make your own, like e.g.:
public static void generateChallan(String[] bankNames, Integer[] amounts) {
//Execute your logic here
}
Next you should be able to pass multiple variables to both the bankNames and amounts arguments, as they now are 2 arrays instead of one.
More specifically, this would be something like bank_name[ALL] (multi) to arg0[0] (multi) and similar for amount[ALL] to arg1[0] as shown in the below screen shot:
I'm not 100% if this is really addressing your problem, but based on your screen shots, it looks like you will never get 2 multi-valued process variable into your java service method.
Feel free to confirm whether or not this helps.
0
Answers
-
Have you checked in your custom PDF generation code to confirm that it is the data being passed that is wrong and not the loop that prints the table? You could try running the process statefully instead, and adding in a manual step to allow you to inspect the process variables (I do this quite often, and use DA to open the task and check the variables).
0 -
Hi Nick,
I tried this approach to check how process variable is getting data, but when i open manual activity in DA showing me error .
So that again tried to print my class args[] in "sys output"
When i select single value in result list and click on generate pdf args[] in console are:
If it is multi value selected
Args[] printing in console like below:
here my bank name argument of selected second record is missing, as like if 3 records selected only 1st selected row bank name is printing with all 3 record amount value but next 2 records bank name is missing. I already showed how i did mapping to java service args[] to process variables.
0 -
Unfortunately I don't see the final image with your console output, but in any case, can you confirm what version and patch of xCP you are using (e.g. 2.2 P09). Can you also show me the configuration of the data mapping 'copy' operations as it might be that they are set to overwrite or something.
0 -
Hi Vasu,
Could you please confirm purpose of the below screen shot:
The reason I'm asking is that the way I read this screen shot is that you trying to get a multi-value variable into a single value argument. More specifically, you are copying bank_name[ALL] (multivalued) into arg0[0] (single value) and the same applies to amount[ALL] to arg0[1].
If you want to copy the multiple values from the process variables as arguments for your java service, I suggest using two arguments for your java service method. More specifically, don't use the main(String[] args) method as entry point, but make your own, like e.g.:
public static void generateChallan(String[] bankNames, Integer[] amounts) {
//Execute your logic here
}
Next you should be able to pass multiple variables to both the bankNames and amounts arguments, as they now are 2 arrays instead of one.
More specifically, this would be something like bank_name[ALL] (multi) to arg0[0] (multi) and similar for amount[ALL] to arg1[0] as shown in the below screen shot:
I'm not 100% if this is really addressing your problem, but based on your screen shots, it looks like you will never get 2 multi-valued process variable into your java service method.
Feel free to confirm whether or not this helps.
0 -
Hi GinoVicari ,
Thanks for identifying issue, issue is because of passing multi value arguments to single args in main() method.
As you suggested I have created a method with those many string args[] variables which i am getting as multi args from process, so that my issue got resolved.
@Nick King: Thanks for your support in identifying problem area of data mapping 'copy' operations.
One more issue we are facing regarding image viewer in xcp application.
i.e In a work queue activity form we have around 50-60 data entry fields are there to be entered by user by viewing the image in same form.
At run time when user enter data upto 20 fields he can able to view the image, when he enter to next field image is not scrolling down till the completion of all data entry fields.
My requirement is to scroll down the image and form with one control so that user can fill all entry details by looking at image in the form.(Like Guided data entry search)
Please let me know suggestion to resolve the same.
PFA screen for your reference:
Screen1:
Screen 2:
0 -
Hi VASU1243,
I have the same requirement of generating a PDF from the objects passed from Result list.
Just want to know how did you download the generated PDF back to the browser.Any help or pointers would be really appreciated here.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax