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.

Tracking History

Avatar

Former Community Member
Hello All,<br /><br /> I have a big text box on my form where i need to maintain the history about the form flow.<br /><br /> Consider a scenario, where there are three users A, B, C. <br /> A can initiate the form<br /> B can approve/reject the form<br /> C can approve/reject the form<br /><br />form goes from A -> B -> C.<br /><br />So My history field should contain.<br />"Form initiated by A on <date>"<br />"Form assigned to B on <date>"<br />"Form approved be B on <date>"<br />"Form assigned to C on <date>"<br />...<br />... like wise<br /><br />Please give my some suggestions on how to tackle this situation.<br /><br />Thanks in advance<br />Deepak
13 Replies

Avatar

Former Community Member
There are two ways to do this:



1. From the form



If you add the workflow fields on the form (use the process fields object in the Custom palette), then the server will update those fields with specific process flow information. One of those fields is AWS_ASSIGNED_ID. This will contain the information about the user who is assigned the task (it might be a GUID I do not remember - if it is you can set up a web service call to get the username from the GUID). The AWS_CHOICE field will contain the action that the user chose. You will have to modify the javascript on the AWS_SUBMIT button to update your field before the form is actually submitted.



2. From the server



All of the process information is available to you. You can extract what you need and update the form data accordingly using setValue operation and XPath expressions. You will have to concatinate new values to the old values in the field. You will not be able to update the action taken until the task comes back in.



Make sense?

Avatar

Former Community Member
Hello Paul,



Thanks for your valuable suggetions.



I have not clearly understood #1 ('From the form'). If you can elaborate more on that it would be great...



Any how i'll implement your suggetion, and let you know about the results.



Thanks

Deepak

Avatar

Former Community Member
My 1st suggestion was refering to a solution where all logic was put into the form and none in the process. If you are not familiar with coding on the form then I woudl use option 2.



I prefer option 2 as it centralizes the coding so that if any changes need to be made later they are all in one place.

Avatar

Level 2
Hi Deepak,

I have the same situation. Please let me know once you get the option #2

Please bear with my question !!

Also in the workspace we have Tracking and in that we have the Audit tab. is there soemway we can get it to our form and we can have the history of the workflow?



Tahnks in advance.

Avatar

Former Community Member
Deepak and BPM user



I would recommend the following:



1) Build a sub process that accepts an AdobeID (user id) as input and returns the common name of the person associated with that AdobeID as output. In the sub process, you'll just have to do a Query Single Row call.



2) Map the "Completed ID" output parameter of any user steps you have to a String process variable and, after each user step, pass this String into the sub process you built in 1) to find out their name.



At this point, you'll now know two pieces of information:



1) The route that was taken from the user step in question

2) The name of the person that completed the user step in question



Note that you'll know the route that was taken because, well, you can visually see it in Workbench. To get the date and time, just use the current-datetime (sp?) function.



To get all this information into your form, you can just use a SetValue and append (concatenate) the new information with any information that already exists.



As far as getting the Tracking tab information into your form is concerned, there really isn't a way to directly do this - aside from manually building it into your workflow yourself.



If you have any questions or need further explanation, please feel free to just ask or email me directly at my address below.



Josh Boyle

jboyle@cardinalsolutions.com

Cardinal Solutions Group

Avatar

Level 9
Hi

We have a component that does this. Basically, you create a table with repeating rows in your form, and the component will create a new row with information from the previous AssignTask step.

More information here:

http://avoka.dnsalias.com/confluence/pages/viewpage.action?pageId=1966151

Or email info@avoka.com for more information.

howard

http://www.avoka.com

Avatar

Former Community Member
Hi Howard,



Is it a opensource kind of a component...? Can we use it freely...?



is it easy to use...?



Thanks

Deepak

Avatar

Level 9
Hi Deepak

It's free for use in development and test environments.

You need to purchase it to use in production.

I think it's pretty easy to use, but you can make up your own mind.

You can download an LCA file containing a sample process and form here:

http://avoka.dnsalias.com/confluence/download/attachments/2261102/New+Employee-29-10-2007-1550.lca?v...

Howard

Avatar

Level 3

Hello All,

Somehow I'm able to get what i need. But still there is a problem.

The steps we are doing are:

  • Create a process level variable, which contains some hard coded state information.
  • Map this variable to the pdf form's text field A.
  • on the submit of the form, look at the field A and fill the history.

Now the actual problem is, we have used text box with Allow multiple lines checked.  The requirement is history should be a listbox.

In text box the longer text is wrapping to the next line which is not strictly needed.  If i remove that Allow multiple lines check box, we cannot scroll vertically when the text goes beyond the textbox boundary.

Now the problem with list box:  We are facing a problem in using list box in mapping.  As we dont know exact number of items we cannot have that many items in the schema.  Is there any way to map a dynamic list box.

If the forms moves from A to B to C.  Then the list box content should have 1 item when it goes to B, 2 items when it goes to C (along with #1), and so on.

Please guide us,

Thanks

Deepak

Avatar

Level 9

Hi Deepak

I suggest you take a closer look at the component and sample I posted earlier. Even if you decide not to purchase it, it will give you some good hints about how to implement this.

Howard

Avatar

Level 3

Hi...

I tried your .lca file.  You are trying to maintain history in a table. thats good.  As i have already told you, i have got the solution.  i.e, I'm able to get the history by using some process level variables and some hardcoded text.  But the problem is different.

The requirement is to have a list box for the history.  Each statement has to be displayed in separate lines (not wraped).  I dont know how to make use of list box for this dynamic behaviour.  So we are using a text box.  The problem is there is no object like text area.  If we select Allow Multiple Rows checkbox, the lines gets wrapped when it hits the boundary.  If i uncheck it, we cannot vertically scroll to view the entire text.

So do you have any method where in which i can bind a dynamic list box instead of a text box (The problem is we dont know how exactly history grows based on the iteration)  OR  to use text box object as a text area.

Thanks

Deepak

Avatar

Level 9

Hi Deepak

Like I said, have a look at our sample.

This uses a dynamic table that grows to accommodate the number of lines required.

You could also try a multi-line text field with Expand to Fit (vertically) checked. See the layout tab.

In both cases, you will need to use dynamic forms and a flowed layout.

Howard

Avatar

Level 3

Hello Treisman,

Thanks for your quick reply.

Actually i dont want to use expandable area as you are using.  In my form I have a fixed text box and i need data in that.  I want that text to scroll and not the text box size.

Deepak