Create a workunit in batch using basic method.

Sort:
You are not authorized to post a reply.
Author
Messages
pfguy
Basic Member
Posts: 14
Basic Member
    My question can you do it by just calling the standard api, 1000-processflow and what will the service code be.

    For example an online program if the from is xt30, would be xt30.1_R  if the routine is called from the Release tab....

    If not not really sure what the service will be , how can I get a small batch pgm to display back (can be crude) what the created service code is/was....Make an interactive one, but maybe with no form in it.. So its really a abtch pgm, but testing it interactively is an idea, maybe..

    The program I am working with is very large and is an interface prohram, so I can't be running it a lot of
    times and just plain guessing on what it could be...

    Any info along these lines would be appreciated..

    Thank You
    Ragu Raghavan
    Veteran Member
    Posts: 471
    Veteran Member
      I do not believe the Service code will automatically be populated. The code will need to explicity populate the field WFAPI-I-SERVICE.
      Let us say you have a flow set up to send an email on a Release, and the flow is tied to a Service "EMAIL_PFGUY".
      In the 4GL code, you will need to code something like:

      *** Perform CREATE WORK routine.

      INITIALIZE WFAPI-INPUT.

      MOVE "EMAIL_PFGUY" TO WFAPI-I-SERVICE.
      Set the key values etc.

      PERFORM 1000-WF-CREATE-SETUP.

      followed by creating the variables etc.
      pfguy
      Basic Member
      Posts: 14
      Basic Member
        Thank You for the quick reply... Sounds like what your saying is I cannot use the basic code to trigger a workunit.
        Basic is Perform 1000-Open-workflow-db populate the criteria and variables then perfrom 1000-Procesdflow.

        Was hoping to stay away from the advanced code, as its a lot more coding and haven't yet done one..

        Any more ideas on this, on how to trip a workunit in a batch type colbol program..

        Question: I will not be sending any emails.. SO if I use the advanced code method, do I to populate
        the email type fields at all... (mailto,mailtouser, mailsubject) thinking would not need to..

        Thanks in advance..
        Ragu Raghavan
        Veteran Member
        Posts: 471
        Veteran Member
          Sorry, missed the reference to the Basic trigger. Not used it before.
          pfguy
          Basic Member
          Posts: 14
          Basic Member
            I'm plowing thru it right now, have my doubts, time will tell.
            pfguy
            Basic Member
            Posts: 14
            Basic Member
              Ragu, would you be willing to send me the portion of the code that you have to trigger a Workunit.
              If so, we can get togther with out email addr....
              Ragu Raghavan
              Veteran Member
              Posts: 471
              Veteran Member
                Do you have PA52 ? Search for WFAPI- in the PD file
                pfguy
                Basic Member
                Posts: 14
                Basic Member
                  I think I have it. I compiled a basic trigger with the l option, for list. It puts
                  All of the Lawson Apis in the source list, Pgm.lst is the ext. will let you know how it works out. Thanks for all of the info dropped off in this thread.
                  JM
                  Basic Member
                  Posts: 6
                  Basic Member
                    Hi pfguy! Were you able to figure this out? I am also having issue with basic COBOL trigger that I applied to online program RQ04, the workunits do not get created. Can you advise? Thank you.
                    Kyle Jorgensen
                    Veteran Member
                    Posts: 122
                    Veteran Member
                      I find this to be the easiest way to trigger flows from COBOL.
                      The passed variables are passed to the flow as one block of fixed widith text as "_inputData".
                      No services needed.

                       MOVE "XX99"                TO WFBCI-FORM.
                                 MOVE XX99-FC                 TO WFBCI-FC.
                                 MOVE WS-FLOW-NAME      TO WFBCI-API-NAME.
                                 MOVE "N"                    TO WFBCI-WAIT.
                                 MOVE ZEROS                  TO WFBCI-KEY-SIZES.
                                 MOVE VAR1            TO WFBCI-KEY-VALUE (1).
                                 MOVE 04                     TO WFBCI-KEY-SIZE (1).     
                                 MOVE VAR2         TO WFBCI-KEY-VALUE (2).
                                 MOVE 05                     TO WFBCI-KEY-SIZE (2).
                                 MOVE VAR3         TO WFBCI-KEY-VALUE (3).
                                 MOVE 04                     TO WFBCI-KEY-SIZE (3).
                                 MOVE VAR4      TO WFBCI-KEY-VALUE (4).
                                 MOVE 04                     TO WFBCI-KEY-SIZE (4).
                                 MOVE VAR5      TO WFBCI-KEY-VALUE (5).
                                 MOVE 04                     TO WFBCI-KEY-SIZE (5).
                                 MOVE VAR6      TO WFBCI-KEY-VALUE (6).
                                 MOVE 04                     TO WFBCI-KEY-SIZE (6).
                                 MOVE VAR7    TO WFBCI-KEY-VALUE (7).
                                 MOVE 14                     TO WFBCI-KEY-SIZE (7).
                                 MOVE VAR8       TO WFBCI-KEY-VALUE (8).
                                 MOVE 08                     TO WFBCI-KEY-SIZE (8).
                                 
                                 PERFORM 1000-SEND-TO-BCI.
                      JM
                      Basic Member
                      Posts: 6
                      Basic Member
                        Thank You Kyle, it is interesting idea. I added the code to my RQ04, but now I am getting "An error occurred outside of IOS while accessing Lawson Application : " java error, do you have any idea what am I missing yet? Thank you for sharing.
                        JM
                        Basic Member
                        Posts: 6
                        Basic Member
                          And here is more, getting it in both LID or portal:
                          Error: [0x8f001801 E:Clnt - BCI SDK (ClientSdk) 2049] com.lawson.bpm.netutils.InvalidLoginException: Login error

                          Thank you.
                          Kyle Jorgensen
                          Veteran Member
                          Posts: 122
                          Veteran Member
                            Do you have any other flows triggered by 4GL stuff (either delivered services or other custom code)? Or is this the first one? Do you have other process flows that work normal?

                            I ask because the error seems to indicate configuration issues; user authentication to be specific.
                            JM
                            Basic Member
                            Posts: 6
                            Basic Member
                              Yes, we do have other triggered flows using Lawson standard triggers, they all work fine. thank you.
                              You are not authorized to post a reply.