Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-2953

Error 500 while adding an Operation with an existing Workflow

XMLWordPrintable

      Right after adding a new Operation with an existing workflow the error is thrown:

      Caused by a call to workflow plugin, that calls back the Catalog, which I believe it is an attempt to send the workflow artifact payload and saving/associating it to the component.

      This is the call that hits workflow endpoint.

      curl 'http://localhost:8285/sdc1/feProxy/wf/workflows/0293a1864bae4f26ad8130f1e9b5a737/versions/759c9bf00a204e4891bc5ce0e1fc0b0d/artifact-deliveries' \
        -H 'Connection: keep-alive' \
        -H 'USER_ID: cs0008' \
        -H 'Accept: application/json, text/plain, */*' \
        -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.92 Safari/537.36' \
        -H 'Content-Type: application/json; charset=UTF-8' \
        -H 'Origin: http://localhost:8285' \
        -H 'Sec-Fetch-Site: same-origin' \
        -H 'Sec-Fetch-Mode: cors' \
        -H 'Sec-Fetch-Dest: empty' \
        -H 'Referer: http://localhost:8285/sdc1' \
        -H 'Accept-Language: en,pt-BR;q=0.9,pt;q=0.8,en-US;q=0.7' \
        -H 'Cookie: JSESSIONID=node01ffr895rnmv511398cztt9d50f2.node0; HTTP_IV_REMOTE_ADDRESS=0.0.0.0; HTTP_CSP_WSTYPE=Intranet; Idea-7b48a367=a4b60d75-8e49-4577-9295-9778c96141d8; HTTP_IV_USER=cs0008; HTTP_CSP_FIRSTNAME=Carlos; HTTP_CSP_LASTNAME=Santana; USER_ID=cs0008; Idea-a734b789=2d9cd438-ae6a-4e45-9777-2ad3d137a450; JSESSIONID.2f313dab=node015xcu8n9kyey91vef7bafe7e541.node0; screenResolution=2560x1080; adminer_key=e67a1d827456f5dd6bf347f4785562d8; adminer_permanent=; adminer_sid=f8b6f0b3c4b7092861192b2cc29459cf; HTTP_CSP_EMAIL=designer%40sdc.com; EPService=randomValue; JSESSIONID=node063y6a8iwfpam1xgrivjkoc65f63.node0' \
        --data-binary '{"endpoint":"sdc/v1/catalog/resources/3c4bfd8a-0ef3-4b21-a55c-5be557e2c1e6/interfaces/181540fa-4bff-4078-b44b-e2ed84fb9d74/operations/c7e9b638-4cb0-45fe-8baa-0b8d158d2a16/artifacts/2daf7d73-7dd1-4768-9f1e-053103255970","method":"POST"}' \
        --compressed 

      Then the workflow calls Catalog-BE in this endpoint, that gives the error:

      http://localhost:8080/sdc/v1/catalog/resources/3c4bfd8a-0ef3-4b21-a55c-5be557e2c1e6/interfaces/737c85bf-b8a9-4903-98a6-554816de7bc0/operations/de255587-659b-4a38-9bc3-f425a9a9b488/artifacts/bb496085-c434-49cc-a3f4-47d8bf72196c

      One problem is the Artifact type configuration for WORKFLOW that does not allow the required extension "bpmn" and is not allowed for the component type RESOURCE. This is now being validated after Change-Id: Id0383d9fca9bce0519a4d52a4ecb3a68c8713f0f Issue-ID: SDC-2754. I fixed this and will provide a commit.

      Second problem is a code that was removed in ArtifactsBusinessLogic line 2491.

      if (interfaceType != null && operationName != null) {
          BeEcompErrorManager.getInstance().logBeDaoSystemError(UPDATE_ARTIFACT);
          log.debug("Received both interface and operation for update artifact - something is wrong");
          throw new ByActionStatusComponentException(ActionStatus.GENERAL_ERROR);
      } 

      Introduced in Issue-ID: SDC-2724, Change-Id: I52b4aacb58cbd432ca0e1ff7ff1f7dd52099c6fe.

      Before it would go to an else, not throw an error, calling the abandoned method ArtifactsBusinessLogic.updateArtifactsFlowForInterfaceOperations.

       

            ys9693 ys9693
            andre.schmid andre.schmid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: