Call business process from script task
I want to call a business process from a script task of another business process. I did this because I want to send email to a collection of contacts, so I will do a foreach loop in the script task, and call the second business proces that will send the emails.
The problem is that the second business process, its call from the first one, and appears in the process log as running, but it doesnt do anything, neither send the mail nor finish running.
The script task code:
var _sendMailId = new Guid("451f9ef3-2a11-4ca8-9107-02e23e56f9f3");
var _manager = UserConnection.ProcessSchemaManager;
var _schema = (ProcessSchema)_manager.GetInstanceByUId(_sendMailId);
var _moduleProcess = _schema.CreateProcess(UserConnection);
First business process: Mutiple email sender
Second Business process: MBS Send Email