Skip to main content

Hi everyone,

I’ve created a python script that has the docx library and arcpy library imported in it that takes field values from a GIS feature class and writes it to a docx document successfully. I would like to trigger the python script to run every time that feature class in an enterprise geodatabase is updated.

I am working in the 11.3 Enterprise Environment and have come across this support page regarding implementing webhooks and FME

https://support.safe.com/hc/en-us/articles/25407414850061-Integrating-ArcGIS-Enterprise-Feature-Service-Webhooks-With-FME

I will attempt to do the above, but I have a simple question regarding the FME workspace itself.

I have read up on the PythonCreator and PythonCaller transformers, with the PythonCreator not requiring an inpput. If all I want is an update to the GIS feature class to trigger the python script to run, would the FME workspace just have a PythonCreator with the python script in it and a logger? Or would it be more beneficial to have a Creator connected to a PythonCaller transformer then a logger? Is there any best practices to use one over the other if all I want to do is run the python script upon the update trigger?

Thank you in advance!

Hi ​@hawaiialex, thanks for the question!
I hope I can give you information for a more informed decision.

PythonCreator:

  • Ideal for generating features or performing tasks that don't depend on existing data within the workspace.
  • Simplifies workflows that don't need input data.
  • Reduces complexity by eliminating unnecessary transformers.

Although - Limited flexibility if future requirements involve processing existing features.

Creator + PythonCaller:

  • Suitable for scenarios where the Python script needs to process or manipulate incoming features.
  • Offers greater flexibility for processing existing features.
  • Easier to integrate with other transformers and data streams.

Although - Slightly more complex setup due to the need for an initial feature generation.

 

Given that your goal is to execute a Python script upon an update trigger to a GIS feature class, consider the following:

  • If the Python script operates independently of existing features: Utilize the PythonCreator. This approach simplifies the workspace by removing unnecessary components.

  • If the Python script needs to process or modify existing features: Implement the Creator + PythonCaller combination. This setup provides the necessary framework to handle and manipulate incoming feature data effectively.

 

Additional Resources:


Reply