Case type harness behaviours in Theme Cosmos

This document will explain about the different harness behaviours in theme cosmos when a Case type(work object/wo) is created and opened from different places.

1. Harness behaviour when wo is opened from links from other places

When ever a wo is opened from a link which is configured using “OpenWorkByHandle” action, it opens the work object in read only mode and the top level harness will be the review harness.

2. Harness behaviour when wo is opened after creation

When a wo is created, it will be opening in perform mode directly i.e in perform harness view and the assignment can be processed. This perform harness is opened inside an ajax container which is placed inside the review harness. The structure of harness will be like:

  1. Top level harness will be Review harness

  2. Perform harness will be inside of review harness

3. Harness behaviour when wo is opened from links and clicked on “GO” button from the assignment list

When a wo is opened from links which is configured using “OpenWorkByHandle” action, it opens the work object in read only mode and the top level harness will be the review harness. After clicking “GO” button, the assignment processing area opens in perform harness placed in an ajax container. Harness structure will be like:

  1. Top level harness will be Review harness

  2. Perform harness will be inside of review harness

4. Harness behaviour when wo is opened from “GO” button from the home todo worklist items

When a wo is opened from go button from home todo worklist, it opens the work object in perform mode directly and the harness will be the perform harness. This perform harness would not be placed inside the ajax container and there will only be one harness in the page. This is an expected behaviour, as the GO button uses “OpenAssignment” action api.

5. Harness behaviour when wo is opened from “GO” button from the home todo worklist items and clicked on Cancel button

When a wo is opened from go button from home todo worklist, it opens the work object in perform mode directly and the assignment processing area will be shown. The harness will be the perform harness. This perform harness would not be placed inside the ajax container and there will only be one harness in the page. When clicked on cancel button in this mode, the wo will be opened in the read only mode and the harness will be changed to review harness.

Case processing behaviour

Case assignments are processed perform mode and is launched in the ajax containers. Once the case is processed in the ajax container, it will be in “Review harness” only and not be confirm harness(as in UI kit applications). This is an expected behaviour from cosmos side

Note: In theme cosmos,

  1. Links/buttons configured with “OpenWorkByHandle” action api opens the wo in review mode

  2. Links/buttons configured with “OpenAssignment” action api opens the wo in perform mode

@durab One question I’d love to get answered, as this outlines the “what” happens very clearly, WHY do these different navigations open cases in different ways? What’s the reasoning, so we can understand what the differences are to explain it and/or configure accordingly.

Side question, is there now a move back to referring to cases as work objects, given that in recent years Pega has moved away from older terms like work object, work item etc. and towards case and case type, case management etc?

@durab

Excellent explanation but I can’t still get how to open a case directly in Perform mode upon clicking on the portal OOTB Create Case menu.

I’m in PEGA 8.7 and creating a case from the portal is going through the OOTB navigation menu which is running the script + the create work action. This is opening the case in Review mode and still we would need to click on the “GO” button to have our customer requirement to be satisfied, that is, opening the case in Perform mode.

Please note that we have an assignment as first step of the case

I did investigate some solution here and bypassing the Create default stage would achieved the goal, not sure this is the expected and best practice solution.

Any hints here?

@manse Which version of theme cosmos you are using in 8.7, from version 3, the assignment will directly open once we create the case

@durab

I see the case processing behavior is different in few case types in our application. Still trying to figure out which configuration/setting manages that as in one case type i see after assignment submission Confirm Harness is shown and in other cases Review harness is shown.

When traced even in case type where Review harness being shown initially Confirm Harness is shown and overridden by Review harness due to some theme cosmos java script invocations which is doing reload.

But need help to know which settings/ configurations result in these behaviors. Can anyone suggest on this

@Aditya Viswanatha It’s a bit of a car crash in my opinion. Here’s an example…

Example 1

Create a new case and close it, returning to the Home tab. In the My worklist table, see the new case.

  • Click on the Go button to open case
  • The appropriate flow action is opened
  • Click Change Stage
  • Change Stage fields presented in main screen (not a popup)
  • Change to Stage 2 of the Case
  • Flow Action from Stage 2 opens in main screen

Example 2

Create a new case and close it, returning to the Home tab. In the My worklist table, see the new case.

  • Click on the ID of the case (hyperlink)
  • Open assignment list for the Case is shown (review screen)
  • Click on the Go button to open the assignment
  • The flow action for the assignment is opened in the main screen
  • Click Change Stage
  • Change Stage fields presented in a popup
  • Change to Stage 2 of the Case
  • Flow Action from Stage 2 opens in the popup!!!

I think for us, we will probably end up having to customise a significant amount as it just isn’t feasible to present this level of variation to the users, irrespective of whether it’s “by design” or not.

@durab

When you are in peform harness (inside Review harness) you will have two threads, one for the review harness and the other one to show main section.

When you are in peform harness (directly inside UserPortal) you will have only one thread.

This behaviour is leading to lot of issues for us.

I currently raised a support ticket to address this behaviour and is in progress. I prefer to have one consistent behaviour instead of working with multiple threads at onetime and only 1 thread the other time.

@SateeshB6784 Yes, it’s awful. Terrible architecture and needs completely rebuilding

@durab

I’m using Theme-Cosmos version 4.01 and I can confirm you that assignment is not getting opened in Perform mode :frowning:

@andwww - I resolved the above problem of inconsistency by always opening Perform harness directly. This way, I will have just one thread always and moving away from using AjaxContainer approach.

To achieve this override pyToDoItem sections (both in Assign-Worklist and Assign-WorkQueue)

Inside the section, open Go button Actions and configure it to openAssignment with target as ‘default’ instead of ‘Ajax Container’.

Its a shame unable to use the powerful AjaxContainer approach due to its inconsitencies.

@SateeshB6784 Thanks for the reply. Yes, you’re right, it is a shame - both for the fact you cannot use the Ajax container and the fact you had to customise OOTB rules. But great that you did find a workable solution!