LiveCycle ES2 onwards performance issue and its resolution

 

Almost 2 years back I did a quick post rejoicing about JMS removal from LiveCycle and Work Manager API introduction in LiveCycle ES2. It’s been a while since then and this post summarises what benefits we get with Work Manager and what is critical to do in any LiveCycle ES2 + installations so Work Manager works in favor of you and not the other way around.

Important: ALL of the below information is based on my observations and testing against different LiveCycle ES2+ version on different platforms (os/database/app servers). ALL of the below information is related to LONG LIVED processes only. Repeat, LONG LIVED processes. The way short-lived processes are executed in LiveCycle is totally different to long-lived processes and are working the same way and are out-of-scope for this discussion.

Background:

  1. Before LiveCycle ES2 came out LiveCycle used JMS to facilitate the Long Lived process execution.
  2. When someone or any program invoked a Long Lived process the calls to start a process execution was delivered via JMS message to process engine.
  3. This didn’t work perfectly on high load on the servers.
  4. Then, we got LiveCycle ES2 version with Work Manager API which replaced JMS (my previous post on it is here)
  5. This work manager API (JSR-237) which was a good move forward (in my opinion) to allow container-manageable programming model for concurrent execution of work.
  6. Since that LiveCycle ES2 release it uses this work manager API to facilitate the Long-lived process execution. The latest release of LiveCycle is ES3.

 

The Performance degradation issue

As part of a project I did some investigation into how a long-lived process is executed from start to end. The complaints I heard at that time from some of my colleagues were around LiveCycle 2.5 takes much longer to execute our processes compared to LiveCycle 8.2.

As usual I did process analysis and tried to identify pain points into the process logic… etc but what stuck out the most was the same process took much shorter time on LiveCycle 8.2 compared to default turnkey LiveCycle 2.5 installation. This problem is visible and interesting when you have lot of steps in a process or have lot of sub-process calls.

There is definitely a performance degradation (from total time taken point of view) into the long-lived process execution when your process involves sub-process calls. What it comes down to is around Default value and how Work Manager works.

 

So this is how work manager works in simplest terms -

  1. A request for Long-lived process execution is made. From LC java API or any of the End-Point (aka Start-Point) etc.
  2. A job id returned to the caller and a record is created in LC database for Work Manager.
  3. Work Manager looks at this queue and starts process execution by doing some other inserts and updates in database tables and work is handed over to Process Manager etc etc…
  4. At any point of process execution if it has any sub-process calls then the same process is followed where a message/record is created for new job, work manager looks at that queue and executes the process and returns the results to caller if needed…

Note: For the curious minds.. I’ve attached a mind map file here to provide details on how database level details work. This is based on a blog post done by LiveCycle team.

 

So now coming back to what the problem is..and why the long-lived process executions are slower in ES2+.

Finding:

As the Work Manager looks at a queue once every minute by default it causes the degraded performance in ES2+ versions. This is a big problem once you have large LiveCycle Application where you have around 40-80 processes getting called to do some work. For small little long-lived processes (without not many sub-process calls) its not that bad.

Solution/Workaround:

So the solution or workaround for this situation is to tell Work Manager to look out for new work more often. Luckily the LiveCycle startup parameters have this setting which you can tweak. I set the parameter to 50 from its default value 1000 (the unit is milisecond) after testing what I needed. So the parameter looks like below on our Weblogic servers.

-Dadobe.work-manager.queue-refill-interval=50

Here are the full set of parameters that you can review and tweak based on need.

  • adobe.work-manager.queue-refill-interval
  • adobe.workmanager.debug-mode-enabled
  • adobe.workmanager.memory-control.enabled
  • adobe.workmanager.memory-control.high-limit
  • adobe.workmanager.memory-control.low-limit
Details are described at http://kb2.adobe.com/cps/825/cpsid_82568/attachments/WorkManagerThrottle.pdf

Huh?:

I was surprised to not see this mentioned in the install guide or any other docs that are published for LiveCycle Es2 onwards. The default is set to so large value that there isn’t any ‘same as before’ performance for bigger LiveCycle deployments.

 

Few words for friends who work with LiveCycle:

These details provided above are my observations and findings on what we faced on a client project. Please share your experience on above item as I’m really interested to find out if you haven’t got the same issue (where Work Manager queue refill interval is set to too high by default) or tweaking that value has helped in your project.

Let me know if you need sample LCA and I’m happy to provide simple LCA which can be used to measure the outcome before and after the tweaks.

 

As always, ping me on @pandyaparth on twitter if you want to have a conversation on this or any other LiveCycle stuff!!

6 comments August 29th, 2012

LiveCycle/ADEP Superblog – Human-Moderated Aggregator

Hello Everyone,

It’s been super busy at work recently. Lots of great agile teams based projects. Been busy in architectural work and delivering those hard earn builds. It’s been fun filled 2011 at Avoka. While I look forward to the challenges and opportunities for 2012 its becoming clear that a good information network supported by social connections will be really helpful to learn and deliver really good solutions.

Friends at Adobe have created a superblog specifically around LiveCycle/ADEP Document Services. This human-moderated aggregator is something I’m looking forward to. I’ve lot of blogs in my Google Reader list but it’s always been hard for few other friends to find and subscribe at first instance. And reading regularly to those blog posts are different story!!! I think this LiveCycle specific superblog will help those kinda readers/devs who just wish to look at one place and find all of the community based gems.

The home to this LiveCycle aggregator is - http://blogs.adobe.com/livecyclepost/

It’s the courtesy of Adobe Learning Resources. I hope to see few more initiatives like this to help the knowledge spread around LiveCycle.

I think LiveCycle Enterprise Suite is one of the best platform around SOA/BPM/Document based human and back-office processing. Developer community generated content around tips/tricks, best practices, innovations and success stories will help spread the awareness in dev and business world both.

Best wishes for 2012.

-Parth

Add comment February 6th, 2012

Determining if the LiveCycle Scheduler has Started in Cluster Mode

LiveCycle product blog has recently published a nice article that allows you to check if the LiveCycle scheduler has started properly in cluster mode or not.

Thanks LiveCycle team for publishing the details.
The blog entry can be found at – http://blogs.adobe.com/livecycle/2011/02/schedulerclustermode.html

1 comment February 18th, 2011

Easiest way to create powerful LiveCycle forms – SmartForm Composer

  • If you have found this page while struggling to get something to work in LiveCycle PDF form then you can’t afford to ignore this article .

  • If you are thinking of creating more than 2 PDF forms for your organisation then this post has something that can save you days, weeks and lots of coffee (Saves you $$$$) !!!

Anyone who has created PDF forms in Adobe LiveCycle designer can tell that a complex, fully functional, good looking form with lot of fields can be a challenge to get it right in rapid development environment.

Adobe LiveCycle Designer is a powerful tool and has features to create really amazing forms but it has its downside as well. It can be a serious learning curve. This can limit the productivity as only few guys in the IT or development department can do it for business. This doesn’t scale very well in current economic time as well.

Before I introduce what I think is the easiest and  fastest way to create powrful PDF forms, Let me highlight what I think is causing the most pain when we have to create PDF forms that work with LiveCycle ES or any other data capture and processing system.

Reason 1: No Pain, No Gain of form requirements saga

Getting the PDF form specification with details like field validation, mandatory logic, show-hide logic,  tooltip text, look and feel details is a mammoth task. It’s crucial to get it right BUT it is a challenging to pass on the same requirements to developer. (Imagine at least a 5 pager form with minimum of 100 fields and different look and fill for print and online usage)

Reason 2: No direct visibility to business into form development activity

Unless the business analyst or a subject matter expert sits next to the form designer, it is going to be hard to get a decent look and feel in place in the first iteration. Field placement, correct tooltip text, field grouping with correct title on section etc will just take up lot of time before a final version of the form is released. And then comes the small requests like can you change tooltips as per attached document as legal or usability team has amended them!!? So on and so forth….it just happens..right?

Reason 3: Form development in a team

Forms development in team environment with templates and libraries being shared has its own challenges. Thanks to fragments, so we can update every form that uses it by just opening it and saving again in Designer. But what if a library component needs a change and you have used it 100 times in 20 forms?? The answer…..Outsourcing/hire a  housewife or uni student!!!! In short, sharing of library and template components, maintaining them and making sure that forms have the most up to date library components is a big exercise for any development team.

Reason 4: Compliance to standard L&F and bulk update

I think the reason 4 is self explanatory.

And, my list goes on and on and on….. Over the years I’ve seen so many things that I think can be tackled in much more better and cost effective way. Finally I use a tool that helps me to manage these in a more elegant way.

The Solution:

Avoka SmartForm Composer

I’ve been fortunate enough to see this product maturing from its inception. The amazing simplicity this product brings into the SmartForm development is never seen before.

It would be just too long blog post if I had to go through my fav features of this tool. But fortunately Howard and his team has put together videos to introduce the features and SmartForm Composer’s capabilities to give you an idea of this tool. They can be found at here.

I would definitely recommend to watch those videos. It might just change your perception on how easy and quickly you can get a fully functional and yet powerful form without minimal scripting.

Feel free to comment on this post if you want to know all of the reasons why I would prefer this tool over creating a form in designer. I’ll happily post a new blog entry with them.

Add comment November 11th, 2010

LiveCycle ES2 Workbench add-ons

Hi All,

I’m really looking forward to using the Workbench add-ons that adobe just released on the labs.

More info and download at – http://labs.adobe.com/technologies/lcworkbench_addons/
Here are my fav features among others -

  1. Variable Highlighting
  2. Schema Editor
  3. Type Selection Improvements

Thanks LiveCyle & Workbech team…

Add comment July 5th, 2010

LiveCycle ES2 removes JMS and uses Workmanager API… Yay!!

Until LiveCycle ES2, the JMS was used in LiveCycle to manage processes and tasks. This has led to some of the odd and painful incidents..

LiveCycle ES2 uses Workmanager API (JSR-237) which will definitely make the LiveCycle community happier..

The Livecycle server can also have the java parameters to control the workmanager throttling options.
Here are the option that you can tweak as java parameters:

  • adobe.work-manager.queue-refill-interval
  • adobe.workmanager.debug-mode-enabled
  • adobe.workmanager.memory-control.enabled
  • adobe.workmanager.memory-control.high-limit
  • adobe.workmanager.memory-control.low-limit

More details at – http://kb2.adobe.com/cps/825/cpsid_82568/attachments/WorkManagerThrottle.pdf

1 comment April 25th, 2010

Conditional set value using XPath

In my quest to use XPath functions & expressions more efficiently in LiveCycle I managed to achieve ‘conditional set value’ yesterday.

Example scenarios:

  • Add some text to email body if some condition is true/false.
  • Add some text into T&Cs if certain product is selected.
  • In a generic/single Email or Set Value step you need to construct a big block of text. eg. Offer letter with certain paragraphs based on few conditions.

Approach 1: The usual way (or one of the usual ways):

An orchestration in Workbench with few setValue steps and few conditional routes to add/append the desired text to existing text.

And these steps need to be in certain order.

Approach 2: The XPath trick

I used substring() and number() function with pure XPath expression to construct conditional set value. See the usage below.

Example:

Consider a requirement in which you wish to send an email with few extra lines added to it if product A is ordered. And if contract term is 12 months then we need to add another T&C statement in the email body.

Let’s implement that with both approaches…

Approach 1: Few set value step and routing conditions to set process variables that get used in email body.

Process Diagram:
Set Value - Route condition approach

Set Value - Route condition approach

Email body:

Dear Provisioning Team,

Please send the below details to John.

System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}

{$ /process_data/@ProductAConfigurationDetails $}

Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ /process_data/@TCFor12MonthsContract$}
blah
blah

regards,
BOH Team

Approach 2: Conditional set value with XPath

Process diagram:

Set Value XPath approach

Email Body

Dear Provisioning Team,

Please send the below details to John.

System:{$ /process_data/@System $}
Agent Name:{$ /process_data/@Agentname $}
Product ordered: {$ /process_data/@Product $}

{$ substring(‘This is where the actual text gets put about the product configuration’,
50000000 * (number(/process_data/@Product !=’Product A’))
) $}

Terms and Conditions:
blah blah blah from Legal
adf
adf
{$ substring(’12 Months T&C content is written here or can be xpath expression’,
50000000 * (number(/process_data/@ContractLength !=’12′))
) $}

blah
blah

regards,
BOH Team

Explanation:

  • The above expression marked in blue puts the text in email body if the condition at the end of it fulfills.
  • By moving this logic into the email step itself I could clean up the process design significantly. I believe that LC is too good to do data transformation but common…few set value and few conditional routes for a simple text insertion?? I reckon the XPath trick gives much more cleaner approach to solve this.
  • First thing to notice in the expression is the use of a large number 50000000 . This is used to return blank substring value if the expression is false. Please adjust if your input text can be larger than this.
  • Second thing to notice is the use of comparison operator. I wanted to have 0 (zero) value for substring start value if condition is true. Boolean true is 1 so I’m using opposite operator. Eg. if(product=”Product A”) is represented as product!=”Product A”

As this is an XPath based expression we can use it in any LC component. I tried implementing if-else clause as well but that didn’t turn out well.

If you managed to read through this much then I’m sure you would love to see the undocumented ‘and’ ‘or’ keyword usage in XPath expression. I found that while experimenting and it’s an instant hit among few of my fellow LC users. It can be found here..

Let me know if you find this useful!!!!

4 comments November 27th, 2009

LiveCycle ES2 documentation

I’m thrilled to see LiveCycle ES2 help page with the links to all of the ES2 documentation.

Thanks to Livecycle Docs team at Adobe for publishing this one page reference. I’ve seen colleagues and clients struggling to find different docs since I started working on LiveCycle, some 4 years back.

This is the page that we all should have in our bookmarks.

http://help.adobe.com/en_US/livecycle/9.0/lc_doclist.html

Thanks again Doc team!!

Add comment November 15th, 2009

Upgrade to LiveCycle ES2!! My fav bits

I was recently reading about upgrade to ES2 and new features of ES2 and these are my favorite bits. I’ll play with ES2 after the GM release and post the experiance later.. But so far this is what I’m really looking forward in ES2.

  • Simplify testing and deployment by previewing your business process, including testing form and Flex® user interfaces, and recording the process results.

The testing is on the top of my wish list. I even thought of writting a whole new AIR application to make our life easier around workflow testing and deployment. I’m talking about deployment on several staging environment!! But for now let’s forget about my AIR app development… Thanks ES2 for looking into this.

  • Reference real-time graphical server health statistics within the LiveCycle administration UI.

Love this…eliminates the need for a monitoring software for small projects.. Will it also have customisable alerts too?

  • Upgrade available from ES update 1, LC 7 and LC 6.

This is a big sale point to encourage clients on LC7 deployments. I wish the ‘compatibility layer’ usage can be kept to minimal usage as part of the upgrade.

  • Enhancements to Form Guide development cycle.

This is BIG improvement… It’s something you just need to play with.

Add comment November 11th, 2009

Introducing LC Keywords-Logical Operators– and,or

I was experimenting with xpath expression and found that the ‘and’ and ‘or’ works perfectly as the logical operators.
I’m perosnally so happy to see them working. In few cases it was too hard to configure the conditional routes with just OR/AND joint.

I’ve attached an example to demonstrate a simple usage of ‘and’-'or’ logical operators. This is the condition that I’ve put in the example.

(normalize-space(/process_data/@Input_Value1)=’555′ or normalize-space(/process_data/@Input_Value1)=’666′) and (normalize-space(/process_data/@Input_Value2)=’777′)

I believe that this is going to make workflow design so much cleaner. Instead of nested conditional routes and 4-5 decision points or set value steps we would be able to do lot more things in few steps now.

I think this is an XPath Explorer feature so is not limited to just route conditions. All of the places where XPath expression is evaluated should be able use these.

Hope this helps to you too!!!

Download the example from here.

1 comment July 13th, 2009

Previous Posts


Categories

Recent Tweets

    Recent Posts

    Blogroll

    Tags

    The fine print!!

    The views on this blog are my own and don’t necessarily represent my employer's views, strategies or opinions.