Skip to main content

I was trying to create a flow to refresh all views in one of my solution model in a project. All my transformations are running individually without failing. But as soon as I run the Flow, only first transformation runs, the second one fails with an unclear message “Something went wrong”.

 

I understand this is an EA features as of now, but I see a lot of application of this feature in one of our projects hence I am trying to setup some flows in it. Could you please help in checking if I am doing something wrong here?

Task ID - 1dfb440d-c678-43a4-8c67-0d98467694e8

 

Flow Definition:

-

  {

    "externalId": "tr-tr-SDM-WellStatus-Entity",

    "type": "transformation",

    "name": "1706783603193",

    "parameters": {

      "transformation": {

        "externalId": "tr-tr-SDM-WellStatus-Entity",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn": r]

  },

  {

    "externalId": "tr-tr-SDM-Well-Status-Hierarchy",

    "type": "transformation",

    "name": "1706783606619",

    "parameters": {

      "transformation": {

        "externalId": "tr-tr-SDM-Well-Status-Hierarchy",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn": b

      {

        "externalId": "tr-tr-SDM-WellStatus-Entity"

      }

    ]

  },

  {

    "externalId": "6e59815b-a9a5-4623-8ae4-23f3da9951b0",

    "type": "transformation",

    "name": "1706783608108",

    "parameters": {

      "transformation": {

        "externalId": "6e59815b-a9a5-4623-8ae4-23f3da9951b0",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn":

      {

        "externalId": "tr-tr-SDM-Well-Status-Hierarchy"

      }

    ]

  },

  {

    "externalId": "tr-SDM-WellStatus-EquipmentDataByCompletion",

    "type": "transformation",

    "name": "1706783610661",

    "parameters": {

      "transformation": {

        "externalId": "tr-SDM-WellStatus-EquipmentDataByCompletion",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn": r

      {

        "externalId": "tr-tr-SDM-Well-Status-Hierarchy"

      }

    ]

  },

  {

    "externalId": "c9a76825-7f63-4930-a7f1-af4ae3a78af1",

    "type": "transformation",

    "name": "1706783612153",

    "parameters": {

      "transformation": {

        "externalId": "c9a76825-7f63-4930-a7f1-af4ae3a78af1",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn": <

      {

        "externalId": "tr-tr-SDM-Well-Status-Hierarchy"

      }

    ]

  },

  {

    "externalId": "tr-tr-SDM-DailyProdDataByWell-Well-Data-from-Avocet",

    "type": "transformation",

    "name": "1706783613791",

    "parameters": {

      "transformation": {

        "externalId": "tr-tr-SDM-DailyProdDataByWell-Well-Data-from-Avocet",

        "concurrencyPolicy": "fail"

      }

    },

    "onFailure": "abortWorkflow",

    "dependsOn": :

      {

        "externalId": "tr-tr-SDM-Well-Status-Hierarchy"

      }

    ]

  }

]

 

Hi @HanishSharma, thanks for reporting.

From our logs we see that it’s an issue related to the IdP you’re using (SAuth) and Cognite’s Sessions API. We’ll follow up on this as soon as possible, and keep you posted on any updates here. 


Hi @HanishSharma. Triggering workflow executions using the API (or Python SDK) should work for your projects. It seems the problem is limited to triggering a workflow using the “Run” button in the UI. We’ll continue to look into this, but please use the API in the meantime.


Hi @Jørgen Lund - thanks for the response!

Could you please help me with the API, I did not find the API in the documentation of beta and alpha API docs


@HanishSharma it’s not yet part of the public documentation due to being part of an early adopter program. You can find the API spec using this link. A revision will be made part of our public documentation in the coming weeks as the service becomes Generally Available (March 5th). 

We’re still working on permanently resolving the issues related to SAuth, as per your first question in this thread.

Reach out if you have any other questions or if I can support with anything else!

 


Hi @Jørgen Lund , I tried by creating a CDF Function and trigger the workflow using the below function

res = client.workflows.executions.trigger("SDM-ARP-Model-Refresh", "1")

I tried it using 3 ways:

  1. Deploying and running it manually -
    Task ID - b59369be-0a25-4cde-a508-2cfa3e9de32f
  2. Created a Schedule using ClientID and Secret - that failed to trigger the workflow with the below error message
     


    But we use the same credentials in scheduling the transformations already which works successfully.

  3. ​​Tried it with passing credentials in Jupyter Notebook -  got the same error
     

     


@Jørgen Lund Please ignore my previous comment, I was able to resolve the unauthorized issue.

 

Now the workflow is getting triggered but, “Sessions chaining depth limit exceeded” error is still coming.

Task ID - f639b3a1-d077-4d62-896a-1d553950bca1

 

Could you please help?

 


Hello @HanishSharma, good to see that you resolved the first issue! For the sessions depth limit error, follow the steps defined in this Hub post: 

Note that you need to specify the client_credentials parameter inside the call to client.workflows.executions.trigger for the authentication to work at runtime. 

 

Please let me know if you make it work, or if you need any further support!


Hey @Jørgen Lund , Thanks for the suggestion. I was able to schedule the flow using the python scripts.

But I encountered a bug in the Flow when it was run. The Flow ran successfully but in Run history it showed that a Transformation failed inside the flow, as shown below

 

Below are 2 issues I noticed,

  1. When I checked the transformation run history, it showed that it ran successfully.

 

  1. When a transformation failed, the next transformation should not have run. - but I believe this is just a UI issue, non effective in reality

Good to see that it worked @HanishSharma. Hm, strange behavior in the UI. If you want to inspect the workflow execution details directly you can fetch it from this endpoint. This will tell you more about the execution of that specific Transformation task. A task can fail without failing the workflow if you have used the onFailure parameter of the task (see more information here). You can basically make the task optional, meaning that even in the case that task fails, the workflow will still continue to execute the subsequent tasks.

Hope this helps, and let me know if you have further questions or observations you’d like to share.


Hi @HanishSharma,

We are following up to see whether you're satisfied with the responses you've received

 


Hi @HanishSharma,

I hope the above helped. As of now, I’m closing this topic. Please feel free to create a new post if you have any questions. 


Reply