External Input flow shape in Pega Strategy designer
As per the help note I understood that external input shape is used for reusing the strategies. But I didn't get which scenarios exactly demand to use this shape. Please provide some understanding on what is the purpose, usage and how to use this shape.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
As you mention, the "external input shape" basically tells the strategy that the initial set of strategy results will be passed in when it is called instead of through, for example, proposition import.
I think there are two main use cases
Re-use of a sub-strategy. A re-usable sub-strategy may do some calculation that is being done on various decision results. A (simple) example is the "Set Channel Dimension" strategy in DMSample (the OOTB DSM sample application shipping with PRPC).
Response strategies. When you process a response, typically a data flow is invoked that calls a "Response Strategy" that determines what to do with the response. E.g. send a positive/negative signal to ADM, or store something in IH at response time. The preferred pattern for ADM is "Delayed learning" in which the inputs to the models are stored internally at decision time, then retrieved at response time and passed on to the strategies. Such "response strategies" have External Inputs enabled and so refer to the decision results that are passed on to it from the Data Flow.
Thanks for your helpful sharing on "External Shape". As you mentioned, the external shape is useful for passing the strategy result(s) to other strategy or any decisioning component when the strategy containing the external shape is called by. But without external shape also the strategy results can be passed on to the other components when these are called by, if I'm not wrong.
On the same lines, for the 1st use-case (SetChannelDimension strategy) what is the difference of directly calling a sub-strategy without external inputs shape and with external inputs.
And when we call any substrategy we always have option to choose the component we want to execute from main strategy, so it gives more flexibility to re-use a substrategy from different main strategy. How External Input shape will help here.
In a scenario where the sub-strategy have External Inputs as one starting point and other starting point is just "Set Property shape" and when this sub-strategy is called from a main strategy without selecting any specific public component i see the path of "Set Property shape" getting executed not the one with "External Inputs" shape. Can anyone please through some light on this .
The external input shape represents the strategy results passsed in from either a calling strategy, or from a strategy shape in a DF when configured as shown above.
W/o the external input shape, the propositions/strategy results have to be (re-)created/(re-)imported in the sub strategy. This might work for some use cases when using as a response strategy (but not recommended), it does not make it a proper sub strategy. Think of a sub strategy as a procedure or function: it takes some arguments (the "external inputs") and returns some results (from the "results" shape).
Otto already provided the information in his first and subsequent replies on this thread, so perhaps we need to clarify the following:
The external input is not really a shape, it is a setting
By reusable, we mean the capability to centralize a piece of logic and use it in other strategies (or data flows), not the ability to define a strategy that can be used in many different ways
When you enable the external input setting, you are telling the strategy (or data flow) that references it to pass all the incoming pages (results), execute the referenced strategy for each and every one of these inputs in the decision path established by the components the external input connects to, and pass the resulting pages as inputs to the next stage of processing–in a data flow, this is a data processing instruction, like send results to a destination, or convert; in a strategy, that is the next component.
Will an example help you? Look at the number of pages that are passed to the Sales component in this strategy. This is because the Set Channel Dimension strategy (referenced strategy) has the external input setting enabled.
Observe what happens when you disable the external input setting.