Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

Topic-icon Question Previous step name

More
13 Jan 2020 11:12 #1 by Ayub GOL
Previous step name was created by Ayub GOL
Hello,

I have a process which has an ExecuteDelivery.
The delivery execute a sub-process and in the sub-process i'd like to retrieve the name of the previous step before the sub-process.

How can i do it ?

See export with dependancies in attach file.

Regards,
Ayub

This message has an attachment file.
Please log in or register to see it.

More
13 Jan 2020 17:23 #2 by Thomas BLETON
Replied by Thomas BLETON on topic Previous step name
Hi,

The sessions executes with ExecuteDelivery cannot know the parent session name.

You need to pass the information as a process parameter with the expression ${~/CORE_NAME}$, for example like this :



Does this help in what you were trying to do ?
Attachments:
    More
    14 Jan 2020 10:45 #3 by Ayub GOL
    Replied by Ayub GOL on topic Previous step name
    Hi,

    Thanks for your feedback.

    The step i want to retrieve it's the one just before the process.

    In my screen shot it's correspoinding to the mapping : GCE_m_001_i_DHB_PPH

    Attachments:
    More
    14 Jan 2020 12:10 - 14 Jan 2020 12:11 #4 by Thomas BLETON
    Replied by Thomas BLETON on topic Previous step name
    OK, I did not see this process in your previous Export, but anyway I think I understand better what you need to do.

    You need to setup an "Error handling" process which would be triggered when any of the mappings / steps have an error.
    Is this correct ?

    Here is a quick example, based on a Scripting action as documented in the Reference Documentation "Developer's Guide > Working with Scripting > Using the Scripting Context > getVariableTreeByName Method" :



    Notes :
    - I have put all the mappings and steps that I want to monitor in the same subprocess => no need to design multiple red links, only one will detect any error occurred in the subprocess
    - the scripting action will produce an output like this on the Runtime console, showing the exact step where the error occured :

    14/01/2020 12:00:29,492 - default (c0a83801016fa3b643beceeb09979b15) is started
    -- ACTION --> default/Mappings/Load DIM_PAYMENT_TYPE/L1-DIM_PAYMENT_TYPE-Load/Creation of load table
    java.sql.SQLException: SQL Exception
    at com.indy.engine.main.connections.b.b(SourceFile:253)
    at com.indy.engine.main.connections.b.a(SourceFile:320)
    at com.indy.engine.main.connections.JDBCConnectionContainerI.<init>(SourceFile:43)
    at com.indy.engine.action.common.ActionCodeTypeI.setConnection(SourceFile:379)
    at com.indy.engine.actionCodes.JdbcActionCodeI.executeDDL_DML(SourceFile:769)
    at com.indy.engine.actionCodes.JdbcActionCodeI.executeSimpleCode(SourceFile:1271)
    at com.indy.engine.action.common.ActionCodeTypeI.executeCode(SourceFile:1509)
    at com.indy.engine.action.common.ActionCodeTypeI.run(SourceFile:1653)
    at java.lang.Thread.run(Thread.java:748)
    [...]
    14/01/2020 12:00:49,053 - default (c0a83801016fa3b643beceeb09979b15) is ended


    This example prints the step name and the error on the Console. But you can imagine to store this information in a variable, send an email, or write it in a database... as you wish.
    Does this help for what you were trying to do ?
    Attachments:
      Last edit: 14 Jan 2020 12:11 by Thomas BLETON.
      More
      16 Jan 2020 08:37 #5 by Ayub GOL
      Replied by Ayub GOL on topic Previous step name
      Hello Thomas,

      Sorry for this late response.

      What i wanna do is :

      From the sub-process GCE_p_TEC_log_step_ISF of the delivery TEST_GCE_p_GCE_ISF_PPH_Child retrieve all informations about datastore of the step GCE_m_001_i_DHB_PPH

      I have to feed a table for supervision purposes.

      See in attach file the last version.

      This attachment is hidden for guests.
      Please log in or register to see it.


      Best regards,
      Ayub

      This message has an attachment file.
      Please log in or register to see it.

      More
      17 Jan 2020 17:20 #6 by Thomas BLETON
      Replied by Thomas BLETON on topic Previous step name
      Please send and export of the TEST_GCE_p_GCE_ISF_PPH_Child process, not the TEST_GCE_p_GCE_ISF_PPH.

      I don't know what "retrieve all informations about datastore" means, can you provide more details ?
      More
      20 Jan 2020 08:35 #7 by Ayub GOL
      Replied by Ayub GOL on topic Previous step name
      Hello Thomas,


      Sorry for this lack of precision.
      I want to retrieve source and target datastore, source and target schema from the step GCE_m_001_i_DHB_PPH.

      I hope I have been clearer.

      This attachment is hidden for guests.
      Please log in or register to see it.


      Regards,
      Ayub

      This message has an attachment file.
      Please log in or register to see it.

      More
      22 Jan 2020 17:32 #8 by Thomas BLETON
      Replied by Thomas BLETON on topic Previous step name
      It is not currently possible to extract Source and Target table names from a mapping at execution time.
      This idea sounds quite obscure to me, because a mapping may have multiple Sources, Targets, and the same datastore can be both a Source and a Target in the same mapping.
      So it cannot be as simple as "what is the mapping source and target names" ?
      If you have a real business use case behind this, I suggest you post your detailed need in the Feedback section of this website.
      => stambia.org/feedback