Example #1
0
        private static IList <string> extractProcessDefinitionKeys(IList <string> deployableFileNames)
        {
            List <string> keys = new List <string>();

            foreach (string file in deployableFileNames)
            {
                if (file.EndsWith(".bpmn", StringComparison.Ordinal) || file.EndsWith(".bpmn20.xml", StringComparison.Ordinal))
                {
                    BpmnModelInstance     modelInstance = Bpmn.readModelFromFile(new File(file));
                    ICollection <Process> processes     = modelInstance.getModelElementsByType(typeof(Process));
                    foreach (Process process in processes)
                    {
                        if (process.Executable)
                        {
                            keys.Add(process.Id);
                        }
                    }
                }
            }
            return(keys);
        }