cancel
Showing results for 
Search instead for 
Did you mean: 

Using Include atom

Former Member
0 Kudos

Hi everybody

I wanted to create something like a sub-process within my bizflow using Include atom. As far as I'm concerned no special preparation should be made to neither my 'outer' nor to 'inner' scenario steps. But... what is the proper way to configure inbound channel for included step? I managed to use it when I set Void and Timer to some strange and unlikely date (like year 3000).

The other problem that I encountered was an error after the execution of the 'outer' flow: "Error in scenario step: Multiple receiver segments". Again I found a workaround but it's rather quick-and-dirty: I added a new transformation atom right after Include and the modified default part of the template of this atom to remove 'R' payload, i.e. receiver segment from my 'inner' step:


<xsl:template match="/">

    <Msg xmlns="urn:com.sap.b1i.vplatform:entity">

      <xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>

      <xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>

      <Body>

        <xsl:copy-of select="/vpf:Msg/vpf:Body/*[not(self::vpf:Payload[./@Role=&apos;R&apos;])]"></xsl:copy-of>

        <Payload Role="X" id="{$atom}">

          <xsl:call-template name="transform"></xsl:call-template>

        </Payload>

      </Body>

    </Msg>

  </xsl:template>

I guess that's not the best solution but the only one that I got so far.

Unfortunately I couldn't find anything about it on the Internet and in B1iF's docs.

Kind regards,

Radek

Accepted Solutions (1)

Accepted Solutions (1)

szymon_lipnicki3
Active Participant
0 Kudos

Hi Radek,

When you use Include atom you have to manage by yourself receivers atom. You have to know that including bizflow doesn't active separate scenario, but it add whole bizflow to your scenario so there could be a situation that you have many Payloads with the same id, for wxample two <Payload id="atom2">.

To avoid multiple receivers I suggest you to change atom0 Role to incR or anything else in your included bizflow..

Kind Regards,

Szymon Lipnicki

Former Member
0 Kudos

Hi Szymon

Same ids: I noticed that and so far I haven't experienced any problem with it. As for modifying role - certainly good to know that it works.

What about defining inbound - do you have any tips for that?

Kind regards,

Radek

szymon_lipnicki3
Active Participant
0 Kudos

Hi Radek,

If you want to define inbound for included bizflow then you should prepare a message which can be read inside included step. For Example - your original scenario step has a Pyload[./@id='atom1']. You can refer to this Payload inside included step using xpath /vpf:Msg/vpf:Body/vpf:Payload[./@id='atom1'].

Same ids: what if you have Payload[./@id='atom1'] in your original scenario step and another Payload[./@id='atom1'] inside included bizflow - if you want to refer to the first atom1 then it's ok, but if you want to get second atom1 then you have to point it for example - .../vpf:Payload[./@id='atom1'][2] because for B1if you will have two Payloads with same id.

Kind Regards,

Szymon Lipnicki

Answers (1)

Answers (1)

former_member192773
Active Participant
0 Kudos

Hello Radek,

We create some extra tags (own tags) when we are using an include. In the included flow we validate these tags. I think this is the safest way to achieve this, because changing the role (B1i tag) could give you some errors or strange behaviour.

Best Regards Teun