下午好,
我正在尝试在发送端口中设置输出文件名,并且可用的文件名宏将无法正常工作.
我需要"file.YYYYMMDD_HHMMSS"形式的东西.有一个日期时间组合宏(格式错误),一个仅限时间的宏,但没有仅限日期的宏.
我没有这个过程的编排.
有什么办法可以在地图或管道中设置文件名吗?
谢谢!
小智 5
您可以使用以下格式以YYYYMMDD_HHMMSS格式实现文件名.
在业务流程中使用表达式形状并创建四个变量.
varDateTime=System.DateTime.Now; //varDateTime is datetime type
strDate=varDateTime.ToString("yyyyMMdd"); //strDate is string type
strTime=varDateTime.ToString("HHmmss"); //strTime is string type
outboundfilename= ""+strDate + " _ " +strTime +" "; //outboundfilename is the string variable.
Run Code Online (Sandbox Code Playgroud)
在消息分配形状中使用以下代码
msgOutbound(FILE.ReceivedFileName)=outboundfilename+".xml";
//File extension can be any based on your requirement. I have xml file type.
Run Code Online (Sandbox Code Playgroud)
您不需要自定义管道来执行此操作.