cancel
Showing results for 
Search instead for 
Did you mean: 

Compile Code Stage error

MichaelFu
Level 4
I want to detect an application whether running by using code stage with C# in Object Studio,I have added the reference DLLs and namespaces,but there are always errors in the compile procedure.any help will be appreciated. -----------------------------------------------Code------------------------------------------------------------------------ public void IsSAPRunning(string processName, out bool IsRunning){ IsRunning= System.Diagnostics.Process.GetProcessesByName(processName).Length > 0 ? true : false; } There is an input parameter called "processName" in Inputs Tab and an output parameter called "IsRunning" in Outputs Tab.
6 REPLIES 6

What do the compiler error messages say?

Compile error at line 0:should input }"",It is very strange. I have paste the orignal message as below: Page Stage Name Type Action Description Repairable Launch DetactSAPIsRunning Error Validate Compiler error at line 0: 应输入 } No

BTW,my BP version is 4.2.37.0 /OS:Win7 64bit/.Net Framework:4.0

Strange indeed. Do you have anything in the global code stage?

MichaelFu
Level 4
I have added the external references and namespaces in Code Options tab as below: External References: System.Data.dll/System.Xml.dll/System.Drawing.dll/System.dll Namespace Imports: System/System.Drawing/System.Diagnostics There is an error message when I click the ""check code"" button even if the global code tab is empty in Business Object information stage ,the original message is like this Page Stage Name Type Action Description Repairable Initialise Stage1 Error Validate Compiler error at top section line 25: 应输入类型、命名空间定义或文件尾 No It may demand to input the type,namespace definition or EOF(end of file). Do you have any idea? BTW,I have found the space length of Code Stage is too short in Foundation Tranining and one sample wrote with VB.net, Is there any supplementary learning documents about code stage in Blue Prism Support or somewhere?

MichaelFu
Level 4
It works with your code.thank you Scott.