Gen EDGE

  • 1.  CA Gen PSTEP to Action block

    Posted Sep 06, 2017 01:25 PM

    Hello,

    I have some common business logic in psteps coded. If pstep can be converted to common action block(CAB), it will improve the reusablity of our code.

     

    Is there a way in CA gen to convert PSETP into CAB?, I have noticed XCOPY can be use, by selecting all the

    pstep code line and copy this to CAB, but it seems laborious in our situation.

     

    Any help/information converting pstep into CAB would be appicated.

     

    Regards

    Samir



  • 2.  Re: CA Gen PSTEP to Action block

    Broadcom Employee
    Posted Sep 06, 2017 06:46 PM

    Hi Samir,

    I believe XCOPY is the only available option within the standard toolset to copy a PStep to a Common Action Block. A straight copy of the PStep in the Action Diagram editor will just create another PStep and there is no option to demote it to a CAB.

    Other users may have alternative suggestions because componentisation of PStep code for reuse would have come up before and there may be options within Gen partner tools which  DariusPanahy or TimDargavel can advise on.

     

    Regards,

     

    Lynn



  • 3.  Re: CA Gen PSTEP to Action block

    Posted Sep 07, 2017 01:08 AM

    Lynn's solution is going to be your most reliable mechanism, albeit potentially slowest, for doing so. 

     

    The problem, in the generic, is a difficult one.  Not all statements (MAKE, some SETs) are supported in a CAB like they are in a PStep, nor are Event Actions supported.  You have to care about dialog flows, PStep USEs, packaging alterations, etc.  You're likely going to have to refactor those to support some of the functionality you need.  Depending on your scenario, you could look at doing a PStep USE.  Not available under all circumstances, but may help.

     

    Under the right, stringent circumstances, there's one possibility - each PStep is backed by an AB already, which contains the views/statements.  You could consider an automated mechanism for severing the link between the PSAD and the PStep, but it would ultimately leave the PStep orphaned and you would have to repackage the AB (as it won't be implicitly packaged in a LM via the PStep that consumes it).  It's not a straightforward process by any means.



  • 4.  Re: CA Gen PSTEP to Action block

    Posted Sep 07, 2017 06:45 AM

    Thanks , How do you break link between PSAD and PSTEP?



  • 5.  Re: CA Gen PSTEP to Action block

    Posted Sep 07, 2017 06:59 AM

    We do not have any automation to demote a pstep to an action block. I think creating a new action block and using xcopy will be the safest approach. Breaking the link between the pstep and the action block will be a problem because it will then leave a corrupted p-step in the model unless you then cleanup the remaining pstep objects.



  • 6.  Re: CA Gen PSTEP to Action block

    Posted Sep 07, 2017 12:33 PM

    Thanks for your replies and solutions, As my code is production level, and i dont want to modify(or corrupt) original PSTEP,  I  XCOPY code and create new CAB's,  and use them for new development work.

     

    Regards