Your workflow that invokes the BSA job should use a launch job to invoke the job in BSA and then exit.
BSA has the capability to call BAO's ORCA web services. This mechanism should be used by the BSA job in the event of failure or success to notify BAO.
I have thought about that but unfortunately a BSA provision job cannot be a member of batch job, meaning I cannot execute the workflow job once the provision job has completed successfully.
What does is the job provisioning?
The job is provisioning a bare metal host with ESXi 5.1, once the job has completed I want to add the new host to vCenter, but you cannot execute a provision job and wait.
BAO supports receiving events from VCenter - but I guess - that will not work here either.
It is best to post this question in the BSA forum.
You can enable a provision job to send an SNMP trap on successful completion but it not enabled by default and you cannot enable it via blcli.
I think the best way forward is getting AO to create a file with the RunID and setting a schedule to check the status.
I am not an expert in BSA, so, I do not know why one cannot enable notification. I guess if can use SNMP you can use email notification as well. It seems like your issue is being able to enable trap generation dynamically. Is there a reason why this cannot be enabled while creating the BSA job?
I would avoid polling mechanism as much as possible.
The default setting of the provision job is not to send and email or snmp trap and there is no blcli to turn them on.
The next part of my workflow is to add the new host to vCenter, however this cannot happen until the BSA job is complete.
I’ve not worked with BSA in a while so I’m sure I’m missing something… Isn’t a ProvisionJob a Job? Iow wouldn’t this apply: blcli Job addOneTimeScheduleWithSNMPNotification
I’ve pieced together these snippets from the doc (see the comments for the locations of each page):
JOB_DESCRIPTION="Provision Windows 2003 servers"
#Get the DBKey of the system package you want to use for this job
SYS_PACK_KEY=`blcli SystemPackage getDBKeyByGroupAndName "/SysPackGrp/Windows" "Win2k3"`
#Create an instance of the PROVSERVER class and override some values
WIN2K3_INSTANCE=`blcli PropertyInstance createInstance Class://SystemObject/Server/PROVSERVER PropsForWin2k3 "Server properties for provisioning Win2K3 machines" "intProp=1,strProp=my value,decVal=0.0"
#Get the ID of the ACL template that you want to apply to the servers that you are provisioning
ACL_TEMPLATE_ID=`blcli BlAclTemplate nameToId myACL_Template"
#Create the Provision Job
JOB_KEY=`blcli ProvisionJob createProvisionJob "$JOB_GROUP" "$JOB_NAME" "$JOB_DESCRIPTION" $SYS_PACK_KEY "$WIN2K3_INSTANCE" $ACL_TEMPLATE_ID "$INPUT_FILE" "$TARGET_FILE"'
####take the JOB_KEY from the provision job that was created above
JOB_KEY=`blcli Job addOneTimeScheduleWithSNMPNotification $JOB_KEY "$DATE_STRING" $RECIPIENT $NOTIFICATION_STATUS`
blcli Job execute $JOB_KEY
Cloud Technology Architect
CompuCom Systems, Inc.
you can not call a BAO workflow from another BSA job, just from the UI. So this approach will not work.
Why don't you use a "launch job" activity and then monitor if the job finished. Based on the result, you kick off the subsequent workflows. This way you are not looping in your own flows.
Yeah, I know now that BSA does not support invoking BAO outside of the workflow job.
Apologize if I was not clear, I did not mean to use launch job or a loop to poll. I did not even suggest polling.
However, Olaf has already shown a way to do this by setting notification via SNMP. I am curious if that is possible or not.
If we are going to use polling - what you are suggesting is fine - use a launch job to sleep for a few seconds, check the status, if not done, launch another job and exit. If done, perform the post provisioning task and exit.
Thank you for the suggestions, I will try them when I am back on the office tomorrow.
blcli Job addOneTimeScheduleWithSNMPNotification DBKey:SJobModelKeyImpl:2002254-7-2046108 "2014-05-22 23:35:00" localhost 2
However I need the schedule time and date to be the current date plus 5 minutes