cancel
Showing results for 
Search instead for 
Did you mean: 

Best Practices - Workflow Development in BTP and logic modularization

Sapcoder
Explorer
0 Kudos

We have several complex Workflows in scope, which include the need to have script tasks OR decouple from Workflow and use CAPM. As we see it, we can do the following:

  1. Option 1: Use Script Tasks in Workflow. Advantage: Simpler, doesn’t rely on multiple services Disadvantage: If the workflow fails in the script task, that workflow is essentially stuck. We have to redeploy the workflow and restart it from the beginning
  2. Option 2: Use CAPM as the logic layer for Workflow. Advantage: Can correct code if it fails, deploy, and simply retry the workflow step Disadvantage: decouples the workflow from the code, which could make it more difficult to diagnose issues. Not as modular as Script tasks.

Does the community / SAP have a point of view on this?

Accepted Solutions (0)

Answers (1)

Answers (1)

tobias_breyer
Contributor
0 Kudos

Hi Sarah,

I just want to add some angles you could look at:

- what about re-use of the logic? Can you re-compose the logic in different ways? I'd consider script tasks only modular in the sense that they are forming a type of module together with the workflow they are in. They have a high cohesion, but also a high coupling, with the workflow.

- what about data and its consistency? Some approach might create many working copies in the workflow context which has limits and data protection and privacy concerns when not used appropriately. Sometimes, the goal of implementing a "claim check" integration pattern (storing only identifiers, not data, in the context) leads to preference of one approach over the other.

- you already mention diagnosis: you might be able to achieve (based on your infrastructure and knowledge) more automated testing in one than the other.

Regards,

Tobias