web services

Ahmed Khan's Avatar

Ahmed Khan

11 Feb, 2016 05:55 PM

Hi Guys,

We are trying to get workflow information via your web service and currently using soap UI to test it.

Using readWorkFlowInformation results in boolean response and nothing else.
Are we missing something?

How can we get a list of all current workflows and detailed information for those workflows such as:

  * Get workflow current step (in our case: pending changes, awaiting review, content review, technical review).
  * Get workflows separated by site: CAS, Business, Engineering, Law, etc…
  * Get workflows’ users & comments.

Thank you,

AHMED KHAN
Web Developer
University Web Services
University of San Diego
5998 Alcala Park, Maher 195
San Diego, CA 92110
Phone: (619) 260-4201
[email blocked]
www.sandiego.edu

  1. 1 Posted by Ryan Griffith on 12 Feb, 2016 01:19 PM

    Ryan Griffith's Avatar

    Hi Ahmed,

    Using readWorkFlowInformation results in boolean response and nothing else.

    Make sure you are using the asset's current version ID and not the working copy or draft ID.

    Get workflow current step (in our case: pending changes, awaiting review, content review, technical review).

    The current step of an asset's workflow can be obtained using the readWorkFlowInformation information operation. As I mentioned above, the current version of an asset needs to be used, not the working copy or draft.

    Get workflows separated by site: CAS, Business, Engineering, Law, etc… Get workflows’ users & comments.

    Let me check with the developers to see if these items are possible, but off-hand I do not think they are. I will be in touch as soon as I have additional information for you.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Carlos on 12 Feb, 2016 09:18 PM

    Carlos's Avatar

    Hi Ryan, I'm working with Ahmed in this project too. I was able to get the workflow information by using the asset's current ID but I have a question.

    First of all, let me give you a briefly explanation of the project. We want to create a public site to display all the current workflows, so people can see in which step of the workflow process their submitted content is.

    We currently use the RSS feed to list all the workflows, and we're able to get the workflow ID. My question is; using the API, is there anyway we can use the workflow ID and get the review content property of it, and then the actual content's current ID and type, so I cant pass that information to readWorkflowInformation?

  3. 3 Posted by Ryan Griffith on 16 Feb, 2016 02:14 PM

    Ryan Griffith's Avatar

    Hi Ahmed and Carlos,

    My apologies for the delayed response.

    After checking with the developers, I was able to confirm it is not possible to obtain all workflows for a given Site, only for individual assets. The solution would be to basically loop over each asset in a site and execute readWorkflowInformation operation on it.

    We currently use the RSS feed to list all the workflows, and we're able to get the workflow ID. My question is; using the API, is there anyway we can use the workflow ID and get the review content property of it, and then the actual content's current ID and type, so I cant pass that information to readWorkflowInformation?

    It is not currently possible to obtain workflow information using the Cascade API; however, Index Blocks can render workflow information and the related entity's ID. A possible solution could be to create an Index Block, or blocks, for each Site and publish this information out in either HTML or XML form so you can build out your report.

    Making this information available to the Locator Tool definitely sounds like a good idea since we try to ensure both Index Blocks and the Locator Tool return as much of the same information as possible. I highly recommend posting a suggestion on our Idea Exchange if you would like to see this functionality considered for a future release.

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by Carlos on 19 Feb, 2016 12:11 AM

    Carlos's Avatar

    Thank you for response Ryan, is there anyway to set those blocks to public, so there is no need to enter an authentication?

  5. 5 Posted by Ryan Griffith on 19 Feb, 2016 02:17 PM

    Ryan Griffith's Avatar

    Hi Carlos,

    My apologies for the confusion. What I meant was that you would create a Folder Index Block that indexes all content within the given Site and you would essentially publish that Index Block out to your web server as an XML file (or JSON depending on what you wish to do with it).

    Once the XML file has been published, you can process it however you need. For example, you could loop over that XML file and run the readWorkflowInformation operation using the workflow ID contained within the XML.

    Please let me know if you have any questions.

    Thanks!

  6. 6 Posted by Carlos on 19 Feb, 2016 08:56 PM

    Carlos's Avatar

    Thank you Ryan, it's working now.

    Best regards!
    - Carlos

  7. 7 Posted by Ryan Griffith on 19 Feb, 2016 09:27 PM

    Ryan Griffith's Avatar

    Not a problem at all, Carlos, thank you for following up. I am glad to hear you were able to come up with a workaround.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  8. Ryan Griffith closed this discussion on 19 Feb, 2016 09:27 PM.

  9. Carlos re-opened this discussion on 24 Feb, 2016 11:21 PM

  10. 8 Posted by Carlos on 24 Feb, 2016 11:21 PM

    Carlos's Avatar

    Hi Ryan, thanks again for your help. I do have another question.

    I notice that the xml file that comes from the index block it's not up to date, maybe because it's cached? What can we do in order to get the latest xml every time we call the xml's URL?

    Best regards,
    - Carlos

  11. 9 Posted by Ryan Griffith on 25 Feb, 2016 01:18 PM

    Ryan Griffith's Avatar

    Hi Carlos,

    To confirm, you went the route of publishing the XML out? If so, the easiest thing you can do is create a Publish Set that publishes on a schedule and only publishes that single page.

    For example, you could configure the Publish Set publish the page every day at 5:00AM, or every X hours, to ensure the XML file is updated at the frequency you need.

    Please let me know if you have any questions.

    Thanks!

  12. 10 Posted by Wing Ming Chan on 25 Feb, 2016 01:59 PM

    Wing Ming Chan's Avatar

    Hi Carlos,

    Here I provided an example of reading and publishing the contents of an index block at the same time when a URL is accessed.

    https://github.com/wingmingchan/php-cascade-ws-ns-examples/blob/mas...

    Wing

  13. 11 Posted by Carlos on 25 Feb, 2016 05:34 PM

    Carlos's Avatar

    Thank you Ryan, I'll try that.

    Thank you for your response Mr. Wing very useful library you've created.

  14. 12 Posted by Ryan Griffith on 25 Feb, 2016 07:27 PM

    Ryan Griffith's Avatar

    Not a problem at all, Carlos.

    I'm going to go ahead and close this discussion, but please feel free to comment or reply to re-open if you have any additional questions or issues.

    Have a great day!

  15. Ryan Griffith closed this discussion on 25 Feb, 2016 07:27 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM