Skip to main content
Solved

Issues in Running a Flow in a Project


HanishSharma
Practitioner
Forum|alt.badge.img+3

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": []

  },

  {

    "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": [

      {

        "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": [

      {

        "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"

      }

    ]

  }

]

 

Best answer by Dilini Fernando

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. 

View original
Did this topic help you find an answer to your question?

11 replies

Jørgen Lund
Seasoned Practitioner
  • Product Manager
  • 113 replies
  • February 5, 2024

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. 


Jørgen Lund
Seasoned Practitioner
  • Product Manager
  • 113 replies
  • February 6, 2024

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.


HanishSharma
Practitioner
Forum|alt.badge.img+3
  • Author
  • Practitioner
  • 64 replies
  • February 12, 2024

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


Jørgen Lund
Seasoned Practitioner
  • Product Manager
  • 113 replies
  • February 12, 2024

@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!

 


HanishSharma
Practitioner
Forum|alt.badge.img+3
  • Author
  • Practitioner
  • 64 replies
  • February 16, 2024

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
     

     


HanishSharma
Practitioner
Forum|alt.badge.img+3
  • Author
  • Practitioner
  • 64 replies
  • February 16, 2024

@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?

 


Jørgen Lund
Seasoned Practitioner
  • Product Manager
  • 113 replies
  • February 16, 2024

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!


HanishSharma
Practitioner
Forum|alt.badge.img+3
  • Author
  • Practitioner
  • 64 replies
  • February 22, 2024

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

Jørgen Lund
Seasoned Practitioner
  • Product Manager
  • 113 replies
  • February 22, 2024

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.


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 671 replies
  • March 18, 2024

Hi @HanishSharma,

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

 


Dilini Fernando
Seasoned Practitioner
Forum|alt.badge.img+2
  • Seasoned Practitioner
  • 671 replies
  • Answer
  • March 27, 2024

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


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings