コード例 #1
0
        internal static async Task NotifyAppAboutEvents(IAltinnApp altinnApp, Instance instance, List <InstanceEvent> events)
        {
            foreach (InstanceEvent processEvent in events)
            {
                if (Enum.TryParse <InstanceEventType>(processEvent.EventType, true, out InstanceEventType eventType))
                {
                    switch (eventType)
                    {
                    case InstanceEventType.process_StartEvent:

                        break;;

                    case InstanceEventType.process_StartTask:
                        await altinnApp.OnStartProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);

                        break;

                    case InstanceEventType.process_EndTask:
                        await altinnApp.OnEndProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);

                        break;

                    case InstanceEventType.process_EndEvent:
                        await altinnApp.OnEndProcess(processEvent.ProcessInfo?.EndEvent, instance);

                        break;
                    }
                }
            }
        }
コード例 #2
0
        internal static async Task NotifyAppAboutEvents(IAltinnApp altinnApp, Instance instance, List <InstanceEvent> events)
        {
            foreach (InstanceEvent processEvent in events)
            {
                switch (processEvent.EventType)
                {
                case "process:StartEvent":
                    await altinnApp.OnStartProcess(processEvent.ProcessInfo?.StartEvent, instance);

                    break;

                case "process:StartTask":
                    await altinnApp.OnStartProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);

                    break;

                case "process:EndTask":
                    await altinnApp.OnEndProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);

                    break;

                case "process:EndEvent":
                    await altinnApp.OnEndProcess(processEvent.ProcessInfo?.EndEvent, instance);

                    break;
                }
            }
        }
コード例 #3
0
        private void NotifyAppAboutEvents(Instance instance, List <InstanceEvent> events)
        {
            foreach (InstanceEvent processEvent in events)
            {
                switch (processEvent.EventType)
                {
                case "process:StartEvent":
                    _altinnApp.OnStartProcess(processEvent.ProcessInfo?.StartEvent, instance);
                    break;

                case "process:StartTask":
                    _altinnApp.OnStartProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);
                    break;

                case "process:EndTask":
                    _altinnApp.OnEndProcessTask(processEvent.ProcessInfo?.CurrentTask?.ElementId, instance);
                    break;

                case "process:EndEvent":
                    _altinnApp.OnEndProcess(processEvent.ProcessInfo?.EndEvent, instance);
                    break;
                }
            }
        }