0 votes
1.2k views
in BPD by (120 points)
related to an answer for: what is shared business object?

1 Answer

0 votes
by (30.6k points)

A shared business object (BAW 8.6.0 / 18.0+) is a business object type whose instances are stored once in the database and referenced by id from every process, task and service that uses them - instead of being copied into each execution context by data mapping. Mark the type in the business object editor: Shared = true; every variable of that type then holds a reference.

  • Behaviour: two activities running in parallel that read tw.local.order (shared) see the same object; a change in one is visible to the other after save (last writer wins per field set); a linked process or a called service does not get a copy but the reference.
  • Why: large objects no longer bloat execution contexts and instance migration; parallel work on the same data no longer needs merge scripts; reports can query the shared object storage tables directly.
  • Costs: every access is a database read (lazy), so hot loops over a shared list are slower; the object must be saved by the system (automatic at the end of the step); versions are not kept (no history), and coaches work on a local copy until the task is submitted.
// creating and using a shared BO in a service flow
tw.local.order = new tw.object.Order();            // Order marked "Shared" in the BO editor
tw.local.order.number = "ORD-42";
tw.local.order.lines = new tw.object.listOf.OrderLine();
// pass it to a linked process / another activity: only the reference travels; both see updates after each step

Use shared objects for the central "case file" of a process (order, claim, application) that many steps touch; keep small, step-local data as normal objects. On CP4BA / Workflow Process Service shared business objects are supported the same way.

References

Related questions

0 votes
2 answers 3.6k views
asked May 28, 2018 in BPD by anonymous
0 votes
2 answers 3.2k views
0 votes
1 answer 679 views
asked Mar 30, 2020 in BPD by Anil Singh (30.6k points)
–1 vote
1 answer 1.5k views
+1 vote
2 answers 3.2k views
asked Dec 1, 2018 in BPD by anonymous
0 votes
1 answer 1.9k views
asked Oct 20, 2018 in BPD by BPM Tips Admin (21.5k points)
0 votes
2 answers 2.5k views
asked Aug 31, 2018 in BPD by anonymous
+1 vote
8 answers 10.3k views
asked Jun 11, 2018 in BPD by anonymous
0 votes
2 answers 3.4k views
0 votes
1 answer 876 views
0 votes
1 answer 859 views
0 votes
1 answer 911 views
+1 vote
2 answers 6.6k views

723 questions

807 answers

98 comments

4.9k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...