#define _CRT_SECURE_NO_WARNINGS #include "epm_handler_common.h" int ML_AddFormToAttachments(EPM_action_message_t msg) { printf("========================添加对象流程目标下 Start===================\n"); auto startTime = std::chrono::high_resolution_clock::now(); int ifail = ITK_ok; int attachments_num = 0; tag_t rootTask = NULLTAG, *attachments = NULLTAG; //获取任务对象 EPM_ask_root_task(msg.task, &rootTask); //获取任务目标对象 EPM_ask_attachments(rootTask, EPM_target_attachment, &attachments_num, &attachments); char *argflag = NULL, *argvalue = NULL, *arg = NULL; char arg1value[1024] = "", arg2value[1024] = "", arg3value[1024] = "", arg4value[1024] = ""; //获取参数 int arg_cnt = TC_number_of_arguments(msg.arguments); printf("参数个数为:%d\n", arg_cnt); if (arg_cnt > 0) { for (int i = 0; i 0) { POM_AM__set_application_bypass(true); //添加到流程目标下 EPM_add_attachments(rootTask, size, itemTag, tagType); POM_AM__set_application_bypass(false); } DOFREE(itemTag); DOFREE(itemType); } DOFREE(attachments); auto stopTime = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast(stopTime - startTime); //std::cout << "ML_AddFormToAttachments用时:" << duration.count() / 1000 << std::endl; string usetime = "ML_AddFormToAttachments用时:"; usetime.append(std::to_string(duration.count() / 1000)); WriteLog(true, usetime.c_str()); printf("=========================添加对象流程目标下 End===================\n"); return ifail; }