08.06.2014 Views

Download PDF (1.3 MB) - IBM Redbooks

Download PDF (1.3 MB) - IBM Redbooks

Download PDF (1.3 MB) - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Minimizing the number and size of Business Process Execution<br />

Language variables and business objects<br />

Use the following guidelines when you define BPEL variables and BOs:<br />

► Use as few variables as possible and minimize the size and the number of BOs used. In<br />

long-running processes, each commit saves modified variables to the database (to save<br />

context), and multiple variables or large BOs make this process costly. Smaller BOs are<br />

also more efficient to process when emitting monitor events.<br />

► Specify variables as data type variables. This specification improves runtime performance.<br />

► Use transformations (maps or assigns) to produce smaller BOs by mapping only fields that<br />

are necessary for the business logic.<br />

3.2.7 Human task considerations<br />

Follow these guidelines when developing human tasks for BPEL business processes:<br />

► Use group work items for large groups (people assignment criterion: Group) instead of<br />

individual work items for group members (people assignment criterion: Group Members).<br />

► Use native properties on the task object rather than custom properties where possible. For<br />

example, use the priority field instead of creating a custom property priority.<br />

► Set the transactional behavior to commit after if the task is not part of a page flow. This<br />

setting improves the response time of task complete API calls.<br />

3.2.8 Business process and human tasks client considerations<br />

Consider the following information when developing effective BPEL business process and<br />

human task clients:<br />

►<br />

►<br />

►<br />

Do not frequently call APIs that provide task details and process details, such as<br />

htm.getTask(). Use these methods only when required to show the task details of a single<br />

task, for example.<br />

Do not put too much work into a single client transaction.<br />

– In servlet applications, a global transaction is typically not available. If the servlet calls<br />

the Human Task Manager (HTM) and Business Flow Manager (BFM) APIs directly,<br />

transaction size is typically not a concern.<br />

– In Enterprise JavaBeans (EJB) applications, make sure that transactions are not too<br />

time-consuming. Long-running transactions create long-lasting locks in the database,<br />

which prevent other applications and clients to continue processing.<br />

Choose the protocol that best suits your needs.<br />

– In a J2EE environment, use the HTM and BFM EJB APIs. If the client application is<br />

running on a Business Process Manager server, use the local EJB interface.<br />

– In a Web 2.0 application, use the REST API.<br />

– In an application that runs remote to the process container, the web services API is<br />

an option.<br />

Chapter 3. Development best practices 37

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!