Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

How to read selected data from booking wizard in profileLoadScript?

Solved1.70K views10th December 2020process automation SRM
2
Mieke Dryepondt [SLC] [DevOps Advocate]3.60K 10th December 2020 0 Comments

How to get the data written by user in wizard in profile load script of an activity running in Process Automation.

The Default instance has the following data:

In the profile load I would like to get the “Stop” value as event type as this is what I selected in the wizard.

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 10th December 2020

4 Answers

  • Active
  • Voted
  • Newest
  • Oldest
2
João Severino [SLC] [DevOps Catalyst]13.02K Posted 10th December 2020 0 Comments

Hi Mieke,
Process Automation behaves slightly different from “regular” SRM and I do believe you need to always use the “By Reference” option.
Which means you must have a different Profile Instance for your “Stop” value.

Mieke Dryepondt [SLC] [DevOps Advocate] Selected answer as best 10th December 2020
2
Jarno Lernou [SLC] [DevOps Enabler]5.03K Posted 10th December 2020 0 Comments

I might be wrong, but I think Process Automation uses the references of the profile instance and not the value (if it is not a volatile process profile instance).

I think we have access to the following in the profile load script:

  • Volatile Process Profile Instances
  • Process Profile Instance Guid
  • Input Itf Profile Instance
  • Node Profile Instance
Jarno Lernou [SLC] [DevOps Enabler] Answered question 10th December 2020
0
David Pernes [SLC]90 Posted 10th December 2020 0 Comments

Hi Mieke,

To get the data written by user in wizard in profile load script or any other custom script it is recommended that you would:

  1. Create an SrmBookingConfiguration instance;
  2. Use a SrmBookingConfiguration.GetResource(string functioName) call to collect the SrmResourceConfiguration instance being the function name the Label configured in the node of your Service Definition.
  3. Use SrmResourceConfiguration.GetParameter call to collect the current value that is configured on that parameter of the respective node contained in the reservation.

In the profile Load Script you will be receiving as input the profile that is configured in the node.

In this case you have the Profile “SLC PLM Apply Options Default Instance”, this Profile Instance will contain SLC PLM Event Type with Value Start whereas your reservation resource is configured with STOP given that on the wizard you have the By Reference box unticked.

By the moment your Profile Load Script kicks in your reservation has STOP configured. If you want to change its value use SrmResourceConfiguration.SetParameter

Note: If you have the “By Reference” box unticked the wizard saves your reservation with the param values you have configured. In the case you’d have a profile Instance selected and “By Reference” unticked that profile will also be stored in the reservation but take into account that the parameters that are stored in the reservation reflect what you explicitly configured not what the selected profile instance has.

David Pernes [SLC] Answered question 10th December 2020
0
Robin Meurisse [SLC] [DevOps Enabler]1.15K Posted 10th December 2020 3 Comments

Hi,
As the input is coming from the Booking wizard rather then the passed volatile profile instances, there is another way to read the actual values from the booking wizard:

1. Your automation script should receive as input 3 values: “Info”, “ProfileInstance” and “ProcessInfo”.
2. Deserialize the input “Info” to have a SrmResourceConfigurationInfo object and the input “ProfileInstance” to have a Dictionary containing all the profile instances.
3. Create a new instance of ProfileParameterEntryHelper(Engine engine) and collect all the parameters with .GetNodeProfileParameterEntries().

I’ve included a small code snipped that should let you receive the list of parameters with the values you’ve specified in the booking wizard.

ScriptParam paramInfo = engine.GetScriptParam(“Info”);
ScriptParam paramProfileInstance = engine.GetScriptParam(“ProfileInstance”);
ScriptParam paramProcessInfo = engine.GetScriptParam(“ProcessInfo”);

var srmInfo = JsonConvert.DeserializeObject<SrmResourceConfigurationInfo>(paramInfo.Value);
if (srmInfo == null)
{
throw new ScriptInputValueNullException(“SRM Info is null or is not in the correct format (Serialize SrmResourceConfigurationInfo to JSON).”);
}

var srmNodeProfileConfiguration = JsonConvert.DeserializeObject<Dictionary<string, Guid>>(paramProfileInstance.Value);
if (srmNodeProfileConfiguration == null || !srmNodeProfileConfiguration.Any())
{
throw new ScriptInputValueNullException(“ProfileInstance is null or is not in the correct format (Serialize Dictionary<string, string> to JSON).”);
}

var helper = new ProfileParameterEntryHelper(engine);
List<ProfileParameterEntry> parameters = helper.GetNodeProfileParameterEntries(srmInfo, new NodeProfileConfiguration(srmNodeProfileConfiguration), true).ToList();

Robin Meurisse [SLC] [DevOps Enabler] Posted new comment 10th December 2020
Mieke Dryepondt [SLC] [DevOps Advocate] commented 10th December 2020

Hello Robin,
I’ve tried this, but it gets the default value that is filled in the profile instance definition. In this example = “Start”
I’ve also tried this witht he same result:
helper.GetNodeSrmParametersConfiguration(configurationInfo, nodeProfileConfiguration).ToList();

João Severino [SLC] [DevOps Catalyst] commented 10th December 2020

Hi Mieke,
Process Automation behaves slightly different from “regular” SRM and I do believe you need to always use the “By Reference” option.
Which means you must have a different Profile Instance for your “Stop” value.

Robin Meurisse [SLC] [DevOps Enabler] commented 10th December 2020

After a quick test, Process automation indeed takes the reference value. The solution then would be to create a new Profile Instance with the new value like João mentioned.
My code snippet can then be ignored as it not applicable for process automation.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs