Re-segment an asset using the webservices

Hi everyone,

In our organisation, original documents are often modified after the translation has started. We have to upload the amended version of the file in WorldServer and run a re-segmentation of the document. Since it can happen at any stage in the workflow, we had to adapt the workflows so that each human task has a loop with two actions ("Clear segment" + "Segment asset"). However, this makes our workflows look complicated and not really easy to read for users when displaying them. Moreover, users have to make a "Complete step" each time they need to load the new version of an asset.

I was wondering if it is not possible to trigger the re-segmentation via the webservices, thus avoiding to have to specify the above-mentioned loops in all workflows. I saw that the Asset Manager contains a function "getAssetTranslation" which appears to return an object containing the segmented asset. However, it looks as if the segment cache does not get updated (but I am not sure) and it does not update the word count either. Am I using the right method to trigger segmentation?

Does anyone know how I could trigger an asset segmentation which would:

  • Update the segment cache
  • Update the word count
  • Take parameters, such as the leverage of the TM?

Thank you in advance for your support.

Regards,

Laurent

Parents
  • Our organization has automated this to some degree here is what we are doing.

    So Worldserver actually has some functionality to update an asset and restart a given task in the workflow. This is documented here:

    producthelp.sdl.com/.../GUID-C2F34A2F-7010-4C61-944D-960196DBFB1D.html

    In short the order of operations is

    1. Update the source asset.
    2. Set the associated language tasks as ready to update.
    3. Actually set off the update process.

    What this does is it takes that task for that language project and makes it start back at the beginning of the workflow where you likely already have the auto actions that you are specifying.

    What we do is

    1. we programatically update the source asset using the REST api
    2. we then set the update flag using the client SOAP sdk
    2a. We have requested that SDL make this a REST call as well.
    3. we then leave it to the user to initiate the update process.
    3a. We do this because if the translator or reviewer has not uploaded their work to WS. That work will be lost.
    4. Once they complete it. We have an auto action that saves the segment cache to TM
    4a. If you so desired you could also just update the TM programatically while the task is still at the human step but again, if work has not been
    saved by the user, it will be lost.
    5. After that the task starts over at the beginning of the workflow.

    To control when the workflow starts over for a given task, you must edit the workflow and go into the advanced section of EVERY step (AA or Human etc.) and set the allow updates box to false. then you leave it enabled only for those locations in your workflow where you know you have saved the segment cached to TM.

    We implemented logic at the beginning of our workflow that behaves differently if the task is going through for a second time (we set and attribute before we allow it to restart. You could do the same to ensure the step gets back to the same human step that it was on. We don't do this because if the source changed, we usually need to go through the whole translation process again for the changed text.

    hope this helps.
Reply
  • Our organization has automated this to some degree here is what we are doing.

    So Worldserver actually has some functionality to update an asset and restart a given task in the workflow. This is documented here:

    producthelp.sdl.com/.../GUID-C2F34A2F-7010-4C61-944D-960196DBFB1D.html

    In short the order of operations is

    1. Update the source asset.
    2. Set the associated language tasks as ready to update.
    3. Actually set off the update process.

    What this does is it takes that task for that language project and makes it start back at the beginning of the workflow where you likely already have the auto actions that you are specifying.

    What we do is

    1. we programatically update the source asset using the REST api
    2. we then set the update flag using the client SOAP sdk
    2a. We have requested that SDL make this a REST call as well.
    3. we then leave it to the user to initiate the update process.
    3a. We do this because if the translator or reviewer has not uploaded their work to WS. That work will be lost.
    4. Once they complete it. We have an auto action that saves the segment cache to TM
    4a. If you so desired you could also just update the TM programatically while the task is still at the human step but again, if work has not been
    saved by the user, it will be lost.
    5. After that the task starts over at the beginning of the workflow.

    To control when the workflow starts over for a given task, you must edit the workflow and go into the advanced section of EVERY step (AA or Human etc.) and set the allow updates box to false. then you leave it enabled only for those locations in your workflow where you know you have saved the segment cached to TM.

    We implemented logic at the beginning of our workflow that behaves differently if the task is going through for a second time (we set and attribute before we allow it to restart. You could do the same to ensure the step gets back to the same human step that it was on. We don't do this because if the source changed, we usually need to go through the whole translation process again for the changed text.

    hope this helps.
Children
  • Dear Eric,

    Thank you for the answer you suggested.

    I also investigated this possibility but did not opt for it because:
    1. it creates an additional task in the project: some of the documents we processed are not modified once or twice but several times (we are sometimes in the two-digit version numbers!). If a task is created each time, we will loose the overview.
    2. This requires a complete step, which I would like to avoid if possible

    My idea is not to update the TM between the versions. I am using Perfect Match in Studio for that. I already have feature which enables me to do the full roundtrip (upload file, Complete Step to re-segment via the loop described in the original post and finally apply Perfect Match with the local sdlxliff of the previous version). What I would like to avoid is the loop in the workflow including the complete step.

    Regards,

    Laurent

    PS: Sorry for rejecting your answer.
  • Hi Laurent,

    The word 'PerfectMatch' in your message reminds me one case I found before, which is using of PM in Studio can generate inacceptable SDLXLIFF files in the return package, and an error occurred at importing back to WorldServer.

    Please raise a ticket to our SDL Technical Support to ask the current situation of the issue WSXI-6286.

    Best,
    Taiki