I'm trying to creat a task trggerred by external event and I have already created the task. However when I tried to add a trigger to the task, it didn't work. It didn't fail or have any error message, just the task triggering was always none. Can someone tell me why? Is it a server side issue? Here is my code to add the trigger:
ExternalEventTrigger st = new ExternalEventTrigger();
st.Type = TaskTriggerType.ExternalEventTrigger;
st.Enabled = true;
st.ID = Guid.NewGuid();
QMSAPIService.Trigger[] List_Trigger = new QMSAPIService.Trigger[1];
//add triggering
documentTask.Triggering = new DocumentTask.TaskTriggering();
documentTask.Triggering.TaskDependencies = new List<TaskInfo>().ToArray();
documentTask.Scope = DocumentTaskScope.General;