Question
Veteran Careers First
US
Last activity: 7 Feb 2018 3:42 EST
Connect-SQL question
My requirement is to write a row in external database each time a case is created.
I need some guidance on how to get started.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi Henry,
You can configure an activity on the flow action as a preprocessing activity and in that activity you can have a step which can write a row in external DataBase.
Please let me know if this helps.
Regards,
Vikash
Veteran Careers First
US
Any direction on writing the activity. Such as..
Step 1 Page New
Step 2 Property Set
Step 3 RDB Save
etc
NCS
SG
Hi Henry,
You can refer this for better understanding. At the bottom all the RDB methods are well described. Hope this helps.
Ex-:
- Page-New {Create a new page instance which is mapped to the external table}
- Property-Set {Set required values into the page}
- Call RDB-Save on the page {Save your instance, refer the link to get a clear understanding of which parameter values to be passed}
- Page-Remove
Regards,
Yasantha
Veteran Careers First
US
I have created a class (RDB external) that is mapped to a table in the external Database.
So it can use Obj-Methods.
Before I use Obj-Save and then commit I wanted to first make sure by using Obj-Open.
The 'PropertyName' and "PropertyValue' fields are confusing me a bit as I try to get the value from a database column to show on clipboard.
If I hard code a value it displays. But when I do not, it does not display on clipboard and tracer gives an error on that step.
Perhaps I do not understand what vaules need to be in these fields.
Or maybe it has something to do with setting the 'Keys' on the general tab of the class that I created.
I am a bit confused so any guidance you can provide would be helpful.
Pegasystems Inc.
IN
Hello Henry,
In your case obj-open is failing because you are using Page TestOpen which is just declared it doesn’t have any values .
In the property value you should use a property which already have some value in it ,you can think of getters in POJO class which does the same .
Property names are used as setters .
However your use case is still confusing you want to save an object but before that you want to open it which anyway doesn’t exist in database .
You can follow the steps mentioned by Yasantha which would suffice your requirement .
Thanks,
Arun
Pegasystems Inc.
US
As per Arun explanation, you should use the property which has the value in the clipboard as in your case TestOpen doesn't hold any value in the clipboard as it is just declared page in the Activity Pages&Classes tab. If your property exists in the current work object then you can use pyWorkPage.PropertyName or Primary.PropertyName(if your activity is in work object class.
Veteran Careers First
US
If I add pyWorkPage to pages and classes tab.
pyWorkPage is the 'Page Name' so what would I put for the 'Class'
Pegasystems Inc.
US
You don't need to declare it in Activity Pages & Classes Henry, you can directly use it in your activity to refer the primary page you can use Primary keyword or pyWorkPage.
Veteran Careers First
US
Thanks for your reply. I did not mean to be confusing. I was attempting to use Obj-Open first because I wanted to make sure I understand and make sure I was communicating and getting values from external Database. I did not want to Obj-Save yet because I was afraid to make a mistake and save something in the wrong place. So now I am attempting to use pyWorkPage values for PublicationIssue.
If I add pyWorkPage to pages and classes tab.
pyWorkPage is the 'Page Name' so what would I put for the 'Class'
Pegasystems Inc.
IN
Hello Henry,
By convention in standard flow processing activities, when a single (non-cover) work item is opened onto the clipboard, the page is named pyWorkPage.
That means your submitting a user form which is invoked as part of the flow and upon submitting the form your properties will be observed under pyWorkPage .
So pyWorkPage you no need to declare it ,in the property values try to give the values like below
For example you have external table called Customer(in your case TestWrite) and you have properties customerName and contactnumber then declare the external class in pages and classes tab.
Property-name property-value
TestWrite.PropertyName pyworkpage.propertyName(user input value from the form)
Thanks,
Arun
de Volksbank
NL
Hi, In place of activity, you can use data transform for setting the required values and for saving and committing the changes you can call activity from DT, you can use - using OOTB function @Utilities.pxExecuteAnActivity(Primary,activityname).
That way you can avoid using activities.
Regards
Gouri Shankar K