Business Area Commands
This page includes the following:
add_business_area()
Create a new business area as a child of an existing area.
Parameters:
-
name- name for the new area -
parent(optional) - name of the area to add the new area underDefault: 'All Jobstreams'
-
annotation(optional) - description which is displayed in the "Edit Jobstream" dialogDefault: None
-
email_addresses(optional) - string containing a comma-separated list of email addresses to which alerts for jobstreams in the business area should be sentDefault: None
-
is_business_day_user_supplied(optional) - whether the business day is defined by the user (vs system defined)Default: False
-
is_business_day_critical_only(optional) - whether only Critical jobstreams are shown for this business dayDefault: False
-
is_business_day_inherited(optional) - whether the business day is inherited from a parent area (vs explicitly defined)Default: False
-
business_day_end_offset(optional) - the end of the business day in milliseconds past midnight, GMTDefault: 0
-
business_day_duration_hrs(optional) - the length of the business day in hoursDefault: 24
Dependencies:
- Must be logged in as admin
Result:
- New business area created with given parameters
Example add_business_area() command line usage:
>>> add_business_area(name='area7', parent='area2', annotation='area 7',
email_addresses='a@b.c, b@c.d', is_business_day_user_supplied=False,
is_business_day_critical_only=False, is_business_day_inherited=False,
business_day_end_offset=100, business_day_duration_hrs=12)
adding business area: "area7"
done
>>> add_business_area(name='area5', parent='area2', annotation='fifth area')
>>> add_business_area(name='area4', parent='All Jobstreams')
Example add_business_area() script usage:
import sys
from jaws import *
login()
print 'begin'
try:
add_business_area(name='area8', parent='area4', annotation='area 8',
email_addresses='a@b.c, b@c.d', is_business_day_user_supplied=False,
is_business_day_critical_only=False, is_business_day_inherited=False,
business_day_end_offset=100, business_day_duration_hrs=12)
print 'end'
finally:
logout()
business_area_impl()
Get the Java object representing the business area with the given name.
Parameters:
name- name of the business area to retrieve
Dependencies:
- Must be logged in
Result:
- A Java object representing the given business area
Example business_area_impl() command line usage:
>>> business_area_impl(name='area1')
area1
>>> business_area_impl('area1')
Example business_area_impl() script usage:
import sys
from jaws import *
login()
print 'begin output'
try:
areas = ['area1', 'area2', 'area3']
for a in areas:
print a + ": " + str(business_area_impl(a))
print 'end output'
finally:
logout()
business_areas()
Get a tree containing the names of all business areas.
Each area is represented by a tuple (name, children), where children is a list of similar tuples.
Parameters:
- None
Dependencies:
- Must be logged in
Result:
- A tree of names of business areas
Example business_areas() command line usage:
>>> business_areas()
(u'All Jobstreams', [(u'area1', [(u'area6', []), (u'area2',
[(u'area3', [])])]), (u'area4', []), (u'area5', [])])
Example business_areas() script usage:
import sys
from jaws import *
login()
print 'begin output'
try:
print business_areas()
print 'end output'
finally:
logout()
delete_business_area()
Delete a business area. It is required that the business area is empty. If the business area contains jobstreams or other business areas, this call will return an error.
Parameters:
name- name of the area to be deleted
Dependencies:
- Must be logged in as admin
Result:
- Given business area deleted
Example delete_business_area() command line usage:
>>> delete_business_area(name='area5')
deleting business area: "area5"
done
>>> delete_business_area('area5')
Example delete_business_area() script usage:
import sys
from jaws import *
login()
print 'begin'
try:
bus = ['area6', 'area7', 'area8']
for b in bus:
delete_business_area(name=b)
print 'end'
finally:
logout()
update_business_area()
Update the name and/or parent of a business area.
Parameters:
-
name- name of the business area in the AAI database -
new_name(optional) - new value for the name, None to leave it unchangedDefault: None
-
new_parent(optional) - name of the existing business are to become the parent, None to leave it unchangedDefault: None
-
new_annotation(optional) - replaces the previous description, if not NoneDefault: None
-
new_email_addresses(optional) - replaces the previous string containing a comma-separated list of email addresses, if not NoneDefault: None
-
new_is_business_day_user_supplied(optional) - whether the business day is defined by the user (vs system defined)Default: None
-
new_is_business_day_critical_only(optional) - whether only Critical jobstreams are shown for this business dayDefault: None
-
new_is_business_day_inherited(optional) - whether the business day is inherited from a parent area (vs explicitly defined)Default: None
-
new_business_day_end_offset(optional) - TimeOfDay object representing the end of the business dayDefault: None
-
new_business_day_duration_hrs(optional) - the length of the business day in hoursDefault: None
Dependencies:
- Must be logged in as admin
Result:
- Specified parameters updated for given business area
Example update_ business_area() command line usage:
>>> update_business_area(name='area7', new_name='7th_area',
new_parent='area5', new_annotation='7th area',
new_email_addresses='c@d.e, d@e.f',
new_is_business_day_user_supplied=False,
new_is_business_day_critical_only=False,
new_is_business_day_inherited=False,
new_business_day_end_offset=TimeOfDay.valueOf('22:30:00'),
new_business_day_duration_hrs=20)
updating business area: "area7"
done
Example update_ business_area() script usage:
import sys
from jaws import *
login()
print 'begin'
try:
update_business_area(name='area4', new_name='4th_area',
new_parent='area2', new_annotation='4th area',
new_email_addresses='c@d.e, d@e.f',
new_is_business_day_user_supplied=False,
new_is_business_day_critical_only=False,
new_is_business_day_inherited=False,
new_business_day_end_offset=TimeOfDay.valueOf('22:30:00'),
new_business_day_duration_hrs=20)
print 'end'
finally:
logout()