3 Replies Latest reply on Sep 15, 2020 1:41 AM by Alex _

    Workflow Structure Group

    Alex _ Guru

      Hi all,

       

      I want to create 3 workflow through API for Item, Product2G and Structure Group but when I create the workflows, the structuregroup doesn't create new entry in task list:

       

      this is the reques for the call rest/V1.0/manage/workflow/status/enter and the call works correctly:

       

      {
         "processId": "37204",
         "workflowId": "StructureGroup-Enrichment",
         "status": "20-Validated",
         "entity": "StructureGroup",
         "itemId": [ "44891@10100" ]
      }

       

      but I search the workflow in PIM I can't see the entry.

       

       

      can anyone help me?

       

      Thanks

      A

        • 1. Re: Workflow Structure Group
          Sai Narasimha Prasad Rebba Guru

          Hi Alex,

           

          The dynamic task working fine for StructureGroups but not for workflow task for me. The following are the examples which I tried

           

          http://HOST:1512/rest/V1.0/manage/workflow

           

          {

              "identifier": "testing",

              "label": "testing",

              "status": [

                  { "status": "testingstatus",

                    "workflowTask" : { "container" : "1", "containerEntityId" : "MasterCatalog", "entity" : "StructureGroup", "user" : "Administrator" }

                  }

              ]

          }

           

          Even it gives response as below

          Response:

          {

          createdCounter: 2

          updatedCounter: 1

          failedCounter: 0

          }

           

          It gives an error message in the logs:

           

          "

          INFO   | jvm 1    | 2020/09/11 13:16:32 | 13:16:32,237 WARN  [http-1443] [AbstractEntityItemLabelProvider] The requested object of data type 'Structure' with id '1' has been deleted and is no longer available

          INFO   | jvm 1    | 2020/09/11 13:16:32 | 13:16:32,241 WARN  [http-1443] [AbstractEntityItemLabelProvider] The requested object of data type 'Structure' with id '1' has been deleted and is no longer available

          "

          You too might have got the same response or different?

           

          If you run the following to enter the status into the workflow it give successful response but you won't be able to see the task

           

          http://HOST:1512/rest/V1.0/manage/workflow/status/enter

          {

          "processId": "87654",

          "workflowId": "testing",

          "status": "testingstatus",

          "entity": "StructureGroup",

          "hint" : "Workflow taskkkkkkk Comment for Status1 of StructureGroup",

          "itemId": [ "1@9000" ]

          }

           

          So, please have a check with the following examples and see if you still face same issue. It worked for me.

           

          POST: http://HOST:1512/rest/V1.0/manage/workflow

           

          body:

          {

              "identifier": "hello111",

              "label": "hello111",

              "status": [

                  { "status": "hello111",

                    "workflowTask" : { "container" : "9000", "containerEntityId" : "Structure", "entity" : "StructureGroup"}

                  }

              ]

          }

           

           

          POST: http://HOST:1512/rest/V1.0/manage/workflow/status/enter

           

          body

          {

          "processId": "8464",

          "workflowId": "hello111",

          "status": "hello111",

          "entity": "StructureGroup",

          "hint" : "Workflow taskkkkkkk Comment for Status1 of StructureGroup",

          "itemId": [ "10@9000" ]

          }

           

           

           

          Thank you

          Sai Prasad

          • 2. Re: Workflow Structure Group
            Sai Narasimha Prasad Rebba Guru

            Hello Alex,

             

            The above examples work for you?

             

            Thank you

            Sai Prasad

            • 3. Re: Workflow Structure Group
              Alex _ Guru

              Hi Sai,

               

              I resolved the problem few seconds after I posted this topic .

              I had set the container value to 1 (I forgot this value in the develop) and after change the value with the entityid received from the message, the workflow is appears.

               

              Thanks

              A

              1 of 1 people found this helpful