Leave feedback
  • Question

    CallProc in combination with Composition Center

Enter a new topic
  • Birgit van Pul Birgit van Pul
    0 likes 2105 views


    I've a small project with one message (xmlin event and two storyteller processes). for this message i set the document type to "Invoice". In the scripting block between my event and the processes, i've a switch based on a field "code" inside my xml and do a call proc. For example callproc(process1), so far so good.

    My output connector is a PDF, so actually i expect a pdf with only one page, but the result is that the process1 runs twice, so my pdf contains two pages.

    If i use logging, then i can see that the callproc is only called once, which is good. But in the scripting of my storyteller process, i can see that it comes twice in here. I think it has something to do with the composition center, is this possible?

    Because when i set a rule in composition center, for example "Code = ROOTS", , then when my code is for example "BLA", then i only have one page in my pdf. But when my code is "ROOTS" then i get two pages in my pdf. If i remove the rule in composition center, then i always get two pages in my pdf.

    I hope this is a little bit clear?


    Thursday 19 May, 2011
  • Best Answer
    Stefan Cohen Stefan Cohen StreamServe Employee Administrator

    From the documentation: http://onlinehelp.streamserve.com/5.5/en/wwhelp/wwhimpl/js/html/wwhelp .htm#href=Composition%20Center/Project%20configuration.3.02.html

    "Do not use CallProc scripting function

    It is not possible to use the CallProc scripting function on Composition Center enabled StoryTeller processes. In a scenario without Composition Center, you can use the CallProc function to execute the same process twice but with different output connectors. For example, when printing AFP documents and archiving PDF documents. This is not possible with Composition Center and the reason is that the processes are called according to the rules that are set on the document definition in Composition Center." Regards, Stefan
    Thursday 19 May, 2011
  • Birgit van Pul Birgit van Pul

    Hi Stefan,

    Thanx a lot! Now it's clear. Only one question, is it also possible to set an execution rule on the runtime in design center? And if so, how do i do this? for example $vF_CompanyCode = "ROOTS";


    Thursday 19 May, 2011
  • Petrus Näslund Petrus Näslund

    I had a similar setup once and to avoid the automatic include of composition center enabled processes I made up a small workaround. If this is really a recommended procedure I don't know ;-) But at least it achieved what I was after at that moment, i.e. handling composition center pages through callproc().

    On before process I have this script:

    //due to CC enabled procs always being automatically
    //triggered in runtime we need to set up a manual skip
    //to be used on before page in proc,
    //ie we only call page through callproc above if needed
    $skipAutoCC = "1";

    //but in order for preview to work in CC we need to
    //enable it if preview connector
    if(inConnectorName() = "preViewIn")

    Then in the StoryTeller process on before page I have this script:

    //we should prevent auto trigger of proc in runtime

    Now if you're running SP5 you might even use the fancy isPreview() script to verify mode.





    Thursday 19 May, 2011

    Hi all,

    It is an abberation to can not call the process when we need. I explain, if for an event we have 3 templates, and the final document is the combination of 2 of 3 templates, we need to call the process, if we have to generate some copy, we must call the process, if we want to add some annexes coming from doc def, we must call the process ...

    I implement many project, and each times I need to call a process ...

    Please, let us call our process as we want !!!

    Thank you


    Thursday 19 May, 2011
  • Birgit van Pul Birgit van Pul


    Thanx for your workaround!


    Thursday 26 May, 2011


Latest from the blogs

Read more