Skip to main content
Hi, I'm trying to connect to the K2Rom inside of k2Studio with server side code. I know Ockert has said that it is not possible, however I need to do this to start a new process which has to complete before the process that created it can continue running.

Is there any way of doing this? I keep on getting the same error when trying to create a new connection, "'SourceCode.K2ROM.Connection' is inaccessible due to its protection level".

Please HELP!!! 😢
You need to wrap the K2ROM into a separate assembly and reference this assembly in K2Studio.

The danger of using the K2ROM from within K2Studio lies in the fact that a process instance can not be allowed to 'connect' to itself due to locking of records. If you need to start a different process instance though, it should not be a problem.

Have you considered IPC Events?

Regards,
Ockert
Thanks Ockert. I have not used IPC events no, I'm still pretty new to workflow development.

If I use an IPC event, will it "stop" the previous flow until the new one has finished running, and can I reference the calling flow's datafields?
Hi Dawie,

You can start 'Child' processes through IPC Events Synchronously or Asynchronously. When you start the Child process Synchronously, then yes, the Parent process will wait for the Child process to complete before continuing.

You can also pass data and xml fields from the Parent to the Child (OUT), from the Child to the Parent (IN) or both ways from Parent to Child and back to Parent again (INOUT).

Without a doubt a better and easier (recommended) solution than working with an external assembly wrapping K2ROM.

Hope this helps,
Ockert
Wrapping the K2ROM into a separate assembly and reference this assembly in K2Studio is NOT a good idea.

Calling the K2ROM inside a K2 process for a process instance cause sever memory leak issue that can crash the K2 service. Been there done that...not good

One of the K2 technial consultant suggested:
Write a web service that calls the K2ROM and use the web service and assemblies event in your K2 process

good luck.
DawieLombaard,

Add a web service evnt to your avtivity.

This event should call a web service wich is a K2ROM wrapper. Make sure the web service is on a different box than your K2 server

Reply