Code Modules

Last post 07-25-2008, 2:42 AM by dc. 5 replies.
Sort Posts: Previous Next
  •  06-24-2008, 5:21 AM 24423

    Code Modules

    I'm using Code Modules within K2 Studio for the first time, and have 1 question. If I change some code in a code module (i.e to an existing routine which doesn't change the signature) do I need to export all the processes that use the code module or is there some way of deploying the code module separately.

    Thanks

    Dean

  •  06-24-2008, 5:38 AM 24425 in reply to 24423

    Re: Code Modules

    Hi Dean,

    I don't think there is a way to deploy the code module seperately so you will have to deploy at least one process that uses it. 

    However you can try the following: In the deployment screen, do not select any processes to deploy/export and then export to the server. Then run a new process to test if your changes were deployed. Remember that it will only apply to new process instances started, and not old running process instances.

    I know that in the past I have seen that this does export changes to your destination queues, so it might do the trick for you...

     


    Gerhard
    -----------------------------------------------------------------------------
  •  06-24-2008, 7:59 AM 24431 in reply to 24425

    Re: Code Modules

    Thanks, yes you don't select any processes and it exports code modules.
  •  06-24-2008, 11:01 AM 24437 in reply to 24431

    Re: Code Modules

    Wow I didn't know about this that you could just export code modules.   I just did to try it out, so how does the latest module release tie to the version of the process?   

    If it only applies to the new process instance, and if I go to Version tab and set a previous process version as default, would it have used the "latest" code module I deployed?

    Otherwise the latest process version has 2 versions of code modules (the running process ones use the old code module), and new workitems use the new code module.

    If it applied to ALL running workitems of current process (similiar to changing code in Repair), then I think that would solve the issues of not able to fix the code for existing running process.   That would have been a great help.

  •  06-27-2008, 10:58 AM 24539 in reply to 24425

    Re: Code Modules

    I tried deploying just code module and start a new workitem and it did not make use of the code module I just deployed.  

    I then deployed the process and the new workitem does make use of of changed code module.

    I don't know if exporting the code module does anything by itself??

  •  07-25-2008, 2:42 AM 25096 in reply to 24539

    Re: Code Modules

    Even though one can "export" new versions of the code modules, I dont believe that it makes much sense as code modules are compiled to assemblies and then deployed as part of the process definition.

    That's also why Peter got the behaviour he did. One should remember that Code Module methods' input paramaters may change between versions and as such they are "partnered" with specific versions of processes.

View as RSS news feed in XML